aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-05-04 07:47:11 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-05-04 07:47:11 +0000
commit9304055df518e5b9c85bd4559fcff12b09fed0f0 (patch)
tree05a790142b0ed38f31cc9c961cf3ea586f6e1347 /tests
parent53e0c1b1a6f9cab14cbf767d4b6bd8e05616f0c7 (diff)
'FILE *' changed to 'void *' in all callback functions
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runtests.pl24
1 files changed, 17 insertions, 7 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index ff7fdbb7b..7e5c29ef3 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -20,7 +20,6 @@ my $CURL="../src/curl"; # what curl executable to run on the tests
my $LOGDIR="log";
my $TESTDIR="data";
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
my $FTPDCMD="$LOGDIR/ftpserver.cmd"; # copy ftp server instructions here
@@ -59,7 +58,8 @@ my $short;
my $verbose;
my $debugprotocol;
my $anyway;
-my $gdbthis; # run test case with gdb debugger
+my $gdbthis; # run test case with gdb debugger
+my $keepoutfiles; # keep stdout and stderr files after tests
#######################################################################
# Return the pid of the server as found in the given pid file
@@ -432,6 +432,8 @@ sub singletest {
# if this file exists, it is FTP server instructions:
my $ftpservercmd="$TESTDIR/ftpd$NUMBER.txt";
+ my $CURLOUT="$LOGDIR/curl$NUMBER.out"; # curl output if not stdout
+
if(! -r $CURLCMD) {
if($verbose) {
# this is not a test
@@ -603,12 +605,15 @@ sub singletest {
}
- # remove the stdout and stderr files
- unlink($STDOUT);
- unlink($STDERR);
+ if(!$keepoutfiles) {
+ # remove the stdout and stderr files
+ unlink($STDOUT);
+ unlink($STDERR);
+ unlink($CURLOUT); # remove the downloaded results
+
+ unlink("$LOGDIR/upload.$NUMBER"); # remove upload leftovers
+ }
- unlink("$LOGDIR/upload.$NUMBER"); # remove upload leftovers
- unlink($CURLOUT); # remove the downloaded results
unlink($FTPDCMD); # remove the instructions for this test
if($memory_debug) {
@@ -737,6 +742,10 @@ do {
# continue anyway, even if a test fail
$anyway=1;
}
+ elsif($ARGV[0] eq "-k") {
+ # keep stdout and stderr files after tests
+ $keepoutfiles=1;
+ }
elsif($ARGV[0] eq "-h") {
# show help text
print <<EOHELP
@@ -745,6 +754,7 @@ Usage: runtests.pl [options]
-d display server debug info
-g run the test case with gdb
-h this help text
+ -k keep stdout and stderr files present after tests
-s short output
-v verbose output
[num] like "5 6 9" or " 5 to 22 " to run those tests only