diff options
author | Daniel Stenberg <daniel@haxx.se> | 2000-11-21 17:07:16 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2000-11-21 17:07:16 +0000 |
commit | 2c123051bbbb4997ec53ec6cc8329e51548f82f7 (patch) | |
tree | 37369960fea1127bca1d4d5af2861c30b6d24946 /tests | |
parent | b82fa8d9597ef276471442c6396594c2eb1a0bbd (diff) |
added a command line log that logs all command lines run in the complete
test run
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/runtests.pl | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl index 20a001f3a..34a7dec11 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -11,11 +11,12 @@ use strict; my $HOSTIP="127.0.0.1"; my $HOSTPORT=8999; # bad name, but this is the HTTP server port my $FTPPORT=8921; # this is the FTP server port -my $CURL="../src/curl"; +my $CURL="../src/curl"; # what curl executable to run on the tests my $LOGDIR="log"; my $TESTDIR="data"; -my $SERVERIN="$LOGDIR/server.input"; -my $CURLOUT="$LOGDIR/curl.out"; +my $SERVERIN="$LOGDIR/server.input"; # what curl sent the server +my $CURLOUT="$LOGDIR/curl.out"; # curl output if not stdout +my $CURLLOG="$LOGDIR/curl.log"; # all command lines run # Normally, all test cases should be run, but at times it is handy to # simply run a particular one: @@ -382,6 +383,8 @@ sub singletest { print "$CMDLINE\n"; } + print CMDLOG "$CMDLINE\n"; + # run the command line we built my $res = system("$CMDLINE"); $res /= 256; @@ -454,8 +457,8 @@ sub singletest { # always differ! # verify the sent request - $res = compare($SERVERIN, $PROT, "http", - "^(User-Agent:|--curl|Content-Type: multipart/form-data; boundary=|PORT 127,0,0,1).*\r\n"); + $res = compare($SERVERIN, $PROT, "protocol", + "^(User-Agent:|--curl|Content-Type: multipart/form-data; boundary=|PORT ).*\r\n"); if($res) { return 1; } @@ -577,6 +580,12 @@ if ( $TESTCASES eq "all") { } ####################################################################### +# Start the command line log +# +open(CMDLOG, ">$CURLLOG") || + print "can't log command lines to $CURLLOG\n"; + +####################################################################### # The main test-loop # @@ -593,6 +602,11 @@ foreach $testnum (split(" ", $TESTCASES)) { } ####################################################################### +# Close command log +# +close(CMDLOG); + +####################################################################### # Tests done, stop the servers # |