diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2003-01-27 13:51:35 +0000 | 
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2003-01-27 13:51:35 +0000 | 
| commit | 86742e83345512be14b7ec1f726dc2888e3d862a (patch) | |
| tree | 453e0c93af00bc0c872503cd441acfcc890cbdd6 | |
| parent | 173b35eaf85728276f021520e49e0fd5c5bd6d05 (diff) | |
tests that were not run due to restraints (the netrc-tests) were counted
as skipped twice, and thus the total number of tests appeared wrong
| -rwxr-xr-x | tests/runtests.pl | 29 | 
1 files changed, 16 insertions, 13 deletions
| diff --git a/tests/runtests.pl b/tests/runtests.pl index 46a7b5c1d..1e84a5d69 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -445,6 +445,15 @@ sub singletest {          return -1;      } +    my $serverproblem = serverfortest($testnum); + +    if($serverproblem) { +        # there's a problem with the server, don't run +        # this particular server, but count it as "skipped" +        $skipped++; +        return -1; +    } +      {          my %hash = getpartattr("client");          my $requires = $hash{'requires'}; @@ -460,7 +469,7 @@ sub singletest {              }else {                  print "$testnum requires $requires, which is not set; skipping\n";                  $skipped++; -                return 0;  # look successful +                return -1;  # return test-not-run              }          }      } @@ -1042,20 +1051,14 @@ my $total=0;  foreach $testnum (split(" ", $TESTCASES)) { -    my $serverproblem = serverfortest($testnum); - -    if($serverproblem) { -        # there's a problem with the server, don't run -        # this particular server, but count it as "skipped" -        $skipped++; +    my $error = singletest($testnum); +    if(-1 == $error) { +        # not a test we can run          next;      } -    my $error = singletest($testnum); -    if(-1 != $error) { -        # valid test case number -        $total++; -    } +    $total++; # number of tests we've run +      if($error>0) {          $failed.= "$testnum ";          if(!$anyway) { @@ -1065,7 +1068,7 @@ foreach $testnum (split(" ", $TESTCASES)) {          }      }      elsif(!$error) { -        $ok++; +        $ok++; # successful test counter      }      # loop for next test | 
