chiark / gitweb /
Testing: Reorganise files, variables, etc.
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 27 Oct 2015 17:12:31 +0000 (17:12 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 27 Oct 2015 17:15:43 +0000 (17:15 +0000)
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
.gitignore
TODO
tests/cgi [moved from test.cgi with 97% similarity]
tests/commit-test.pl [moved from commit-test.pl with 100% similarity]
tests/wrap [moved from test-wrap with 54% similarity]

index 90ab049..9a2e781 100644 (file)
@@ -9,4 +9,4 @@ caf.pdf
 caf.tex
 caf.toc
 caf-srcdump
-test-data
+tests/tmp
diff --git a/TODO b/TODO
index 8061b33..c240398 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,6 +1,7 @@
-REQUEST_METHOD=post CAHTEST_HOME=`pwd` ./test.cgi ; echo
+REQUEST_METHOD=post CAFTEST_CAF=`pwd` tests/cgi ; echo
 
-CAFTEST_URL=file:/cgi-bin/test-wrap CAHTEST_HOME=`pwd` w3m -cookie -config /dev/null -o cgi_bin=`pwd` file:///cgi-bin/test-wrap
+mkdir tests/tmp
+CAFTEST_CAF=`pwd` w3m -cookie -config /dev/null -o cgi_bin=`pwd`/tests file:///cgi-bin/wrap
 
 
 update last in db when we return undef from check_divert
similarity index 97%
rename from test.cgi
rename to tests/cgi
index 3261842..6af2413 100755 (executable)
--- a/test.cgi
+++ b/tests/cgi
@@ -10,7 +10,7 @@ use Data::Dumper;
 #use Carp::Always;
 $SIG{__DIE__} = sub { Carp::confess(@_) };
 
-my $dump = "$ENV{'CAHTEST_HOME'}/test-data";
+my $dump = "$ENV{'CAFTEST_CAF'}/tests/tmp";
 
 my @verifier_params =(
     username_password_error => sub {
similarity index 100%
rename from commit-test.pl
rename to tests/commit-test.pl
similarity index 54%
rename from test-wrap
rename to tests/wrap
index b896e82..937820f 100755 (executable)
--- a/test-wrap
@@ -1,11 +1,13 @@
 #!/bin/sh
 set -e
-exec 2>>"$CAHTEST_HOME/test-data/log"
-export HTTP_COOKIE=$(cat "$CAHTEST_HOME/test-data/cookie")
-./test.cgi "$@" | perl -pe '
+cd "$CAFTEST_CAF"
+exec 2>>tests/tmp/log
+export HTTP_COOKIE=$(cat "tests/tmp/cookie")
+export CAFTEST_URL=file:///cgi-bin/wrap
+tests/cgi "$@" | perl -pe '
     next if m/^$/..0;
     next unless m/Set-Cookie: (\w+=[^; ]+)/;
-    my $cf = "$ENV{CAHTEST_HOME}/test-data/cookie";
+    my $cf = "tests/tmp/cookie";
     open C, ">", "$cf.new" or die "$cf $!";
     print C $1 or die $!;
     close C or die $!;