chiark / gitweb /
changelog: document changes since 0.6.0
[secnet.git] / test-common.tcl
index 47b867df3c74b7f7b77132df7060dbdb69336e94..04d229c08ad138ed04e63e82de8cd56f5a55c116 100644 (file)
@@ -7,8 +7,13 @@ proc prefix_some_path {pathvar entry} {
     set env($pathvar) [join $l :]
 }
 
+proc prexec {args} {
+    puts "exec $args"
+    eval exec $args
+}
+
 if {![catch {
-    set builddir $env(STEST_BUILDDIR)
+    set builddir $env(SECNET_TEST_BUILDDIR)
 }]} {} else {
     set builddir .
 }
@@ -17,7 +22,7 @@ if {![catch {
     set tmp $env(AUTOPKGTEST_ARTIACTS)
 }]} {} elseif {![catch {
     set tmp $env(AUTOPKGTEST_TMP)
-}]} {} elseif {[regsub {^stest/t-} $argv0 {stest/d-} tmp]} {
+}]} {} elseif {[regsub {^(?:\./)?([sm]test)/t-} $argv0 {\1/d-} tmp]} {
     set tmp $builddir/$tmp
     file mkdir $tmp
 }