chiark / gitweb /
Testing: Introduce varying CAFTEST_TMP
[cgi-auth-flexible.git] / tests / wrap
index c401f5738b5c8062637cb6a4543a288684922d77..99df0f904c5fc5c03c76089af00dcc01ccef9267 100755 (executable)
@@ -1,13 +1,15 @@
 #!/bin/sh
 set -e
 cd "$CAFTEST_CAF"
-exec 2>>tests/tmp/wrap.log
-export HTTP_COOKIE=$(cat "tests/tmp/cookie")
+: ${CAFTEST_TMP:=tests/tmp}
+export CAFTEST_TMP
+exec 2>>$CAFTEST_TMP/wrap.log
+export HTTP_COOKIE=$(cat "$CAFTEST_TMP/cookie")
 export CAFTEST_URLBASE=file:///
 tests/cgi "$@" | perl -pe '
     next if m/^$/..0;
     next unless m/Set-Cookie: (\w+=[^; ]+)/;
-    my $cf = "tests/tmp/cookie";
+    my $cf = "$ENV{CAFTEST_TMP}/cookie";
     open C, ">", "$cf.new" or die "$cf $!";
     print C $1 or die $!;
     close C or die $!;