chiark
/
gitweb
/
~ian
/
cgi-auth-flexible.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Testing: autotest: Print id in log messages
[cgi-auth-flexible.git]
/
tests
/
wrap
diff --git
a/tests/wrap
b/tests/wrap
index 937820f4a7c129299c2a088daf91204805700ea3..99df0f904c5fc5c03c76089af00dcc01ccef9267 100755
(executable)
--- a/
tests/wrap
+++ b/
tests/wrap
@@
-1,13
+1,15
@@
#!/bin/sh
set -e
cd "$CAFTEST_CAF"
#!/bin/sh
set -e
cd "$CAFTEST_CAF"
-exec 2>>tests/tmp/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+=[^; ]+)/;
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 $!;
open C, ">", "$cf.new" or die "$cf $!";
print C $1 or die $!;
close C or die $!;