aboutsummaryrefslogtreecommitdiff
path: root/tests/runtests.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/runtests.pl')
-rwxr-xr-xtests/runtests.pl29
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