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 90ab04998ea2dc9d36cca48d5d96e53650cfa840..9a2e781605bfc6abe73bed32c0c41d8ad8b21896 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 8061b338c3bed7ae0bb57cd914fd256db323af05..c24039871aaac225c7f0e114315f3bc67180fe7f 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 32618423cbd8098bdf25237aac5dfa5dd6894663..6af24138ed4ab2f4d33f92c801d8056ffd284001 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 b896e826f13932f9cd8c3adcbcbcd829a9799b40..937820f4a7c129299c2a088daf91204805700ea3 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 $!;