aboutsummaryrefslogtreecommitdiff
path: root/tests/runtests.pl
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-11-17 15:15:48 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-11-17 15:15:48 +0000
commit7c6414ebbd7b6dc2e049b5a75a9429eae8678c7f (patch)
tree39e6089a46f42717c4f4084ccc6c3c15597ee908 /tests/runtests.pl
parent85705e105c50f323393f819d7fccc94628d8b11f (diff)
uses stricter output
Diffstat (limited to 'tests/runtests.pl')
-rwxr-xr-xtests/runtests.pl32
1 files changed, 24 insertions, 8 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 31899d300..e787796d5 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -44,6 +44,7 @@ my $memanalyze="../memanalyze.pl";
my $short;
my $verbose;
+my $anyway;
#######################################################################
# Return the pid of the http server as found in the pid file
@@ -66,7 +67,7 @@ sub stopserver {
my $res = kill (9, $PID); # die!
unlink $PIDFILE; # server is killed
- if($res) {
+ if($res && $verbose) {
print "TCP server signalled to die\n";
}
}
@@ -223,11 +224,15 @@ sub compare {
$res = comparefiles($first, $sec);
if ($res != 0) {
- print " $text FAILED";
+ if(!$short) {
+ print " $text FAILED";
+ }
return 1;
}
- print " $text OK";
+ if(!$short) {
+ print " $text OK";
+ }
return 0;
}
@@ -244,16 +249,17 @@ sub displaydata {
print "Running tests on:\n",
"* $version",
- "* host $hostname",
- "* system $hosttype";
+ "* Host: $hostname",
+ "* System: $hosttype";
if( -r $memdump) {
# if this exists, curl was compiled with memory debugging
# enabled and we shall verify that no memory leaks exist
# after each and every test!
$memory_debug=1;
- print "** Memory debugging ENABLED\n";
}
+ printf("* Memory debugging: %s\n", $memory_debug?"ON":"OFF");
+
}
#######################################################################
@@ -399,11 +405,16 @@ sub singletest {
return 1;
}
else {
- print " memory OK";
+ if(!$short) {
+ print " memory OK";
+ }
}
}
}
}
+ if($short) {
+ print "OK";
+ }
print "\n";
return 0;
@@ -423,10 +434,15 @@ do {
# short output
$short=1;
}
+ elsif($ARGV[0] eq "-a") {
+ # continue anyway, even if a test fail
+ $anyway=1;
+ }
elsif($ARGV[0] eq "-h") {
# show help text
print <<EOHELP
Usage: runtests.pl [-h][-s][-v][numbers]
+ -a continue even if a test fails
-h this help text
-s short output
-v verbose output
@@ -487,7 +503,7 @@ if ( $TESTCASES eq "all") {
my $testnum;
foreach $testnum (split(" ", $TESTCASES)) {
- if(singletest($testnum)) {
+ if(singletest($testnum) && !$anyway) {
# a test failed, abort
print "\n - abort tests\n";
last;