chiark / gitweb /
Testing: Introduce varying CAFTEST_TMP
[cgi-auth-flexible.git] / tests / wrap
index fefbef4..99df0f9 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")
-export CAFTEST_URL=file:///cgi-bin/wrap
+: ${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 $!;