chiark / gitweb /
test: Use test/d-* instead of test/tmp for everything
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 12 Oct 2019 21:40:51 +0000 (22:40 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 12 Oct 2019 22:29:26 +0000 (23:29 +0100)
Now it is actually ok to run multiple tests in parallel.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
.gitignore
test/common.tcl

index 6b938a1..8db83a4 100644 (file)
@@ -37,6 +37,5 @@ test-example/sites.conf
 test-example/bogus-setup-request
 build-stamp
 
-test/tmp
 test/d-*
 test/udp-preload.so
index 59b10ba..3a2e1ae 100644 (file)
@@ -155,8 +155,14 @@ proc sendpkt {} {
        [hbytes h2raw c0[join $p ""]c0]
 }
 
-file mkdir test/tmp
-set tmp test/tmp
+if {![catch {
+    set tmp $env(AUTOPKGTEST_ARTIACTS)
+}]} {} elseif {![catch {
+    set tmp $env(AUTOPKGTEST_TMP)
+}]} {} elseif {[regsub {^test/t-} $argv0 {test/d-} tmp]} {
+    file mkdir $tmp
+}
+
 set socktmp $tmp/s
 exec mkdir -p -m700 $socktmp
 regsub {^(?!/)} $socktmp {./} socktmp ;# dgram-socket wants ./ or /