summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-11-28 12:49:39 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-11-28 12:49:39 +0000
commit0d7ba0ec610e55bcf8265a1068d460ef9d0f58d0 (patch)
tree39dd896ecf1c96c51be391d447ba46937c9e96fa
parentb2f0ca8a43b50b95136c2c39154139c2c005535c (diff)
downloadgnurl-0d7ba0ec610e55bcf8265a1068d460ef9d0f58d0.tar.gz
gnurl-0d7ba0ec610e55bcf8265a1068d460ef9d0f58d0.tar.bz2
gnurl-0d7ba0ec610e55bcf8265a1068d460ef9d0f58d0.zip
now counts all test cases and presents a counter at the end
-rwxr-xr-xtests/runtests.pl13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index c47f2ad17..deb9311fa 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -346,6 +346,7 @@ sub singletest {
if(! -r $CURLCMD) {
# this is not a test
+ print "$NUMBER doesn't look like a test case!\n";
next;
}
@@ -606,7 +607,7 @@ runftpserver($verbose);
if ( $TESTCASES eq "all") {
# Get all commands and find out their test numbers
opendir(DIR, $TESTDIR) || die "can't opendir $TESTDIR: $!";
- my @cmds = grep { /^command/ && -f "$TESTDIR/$_" } readdir(DIR);
+ my @cmds = grep { /^command([0-9]+).txt/ && -f "$TESTDIR/$_" } readdir(DIR);
closedir DIR;
$TESTCASES=""; # start with no test cases
@@ -632,13 +633,20 @@ open(CMDLOG, ">$CURLLOG") ||
#
my $testnum;
+my $ok=0;
+my $total=0;
foreach $testnum (split(" ", $TESTCASES)) {
- if(singletest($testnum) && !$anyway) {
+ $total++;
+ my $error = singletest($testnum);
+ if($error && !$anyway) {
# a test failed, abort
print "\n - abort tests\n";
last;
}
+ elsif(!$error) {
+ $ok++;
+ }
# loop for next test
}
@@ -655,3 +663,4 @@ close(CMDLOG);
stopserver($FTPPIDFILE);
stopserver($PIDFILE);
+print "$ok tests out of $total reported OK\n";