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 6b938a118de19012fbe0cd9379fcb6569542fef3..8db83a40262b725dbe8b7435ca3448daad074f51 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 59b10baeef34ede637d0588832048172b6055be8..3a2e1ae39194f64d7f46e20f60fd23ab019cdbcd 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 /