} else {
$flags .= "--ipv$ipvnum --port 0 ";
}
- $flags .= "--srcdir \"$srcdir\"";
+ $flags .= "--srcdir \"$TESTDIR/..\"";
my $cmd = "$exe $flags";
my ($httppid, $pid2) = startnew($cmd, $pidfile, 15, 0);
runtimestats($lasttest);
-if($total) {
- logmsg sprintf("TESTDONE: $ok tests out of $total reported OK: %d%%\n",
- $ok/$total*100);
-
- if($ok != $total) {
- logmsg "\nTESTFAIL: These test cases failed: $failed\n\n";
- }
-}
-else {
- logmsg "\nTESTFAIL: No tests were performed\n\n";
- if(scalar(keys %enabled_keywords)) {
- logmsg "TESTFAIL: Nothing matched these keywords: ";
- for(keys %enabled_keywords) {
- logmsg "$_ ";
- }
- logmsg "\n";
- }
-}
-
if($all) {
logmsg "TESTDONE: $all tests were considered during ".
sprintf("%.0f", $sofar) ." seconds.\n";
if($skipped && !$short) {
my $s=0;
+ # Temporary hash to print the restraints sorted by the number
+ # of their occurences
+ my %restraints;
logmsg "TESTINFO: $skipped tests were skipped due to these restraints:\n";
for(keys %skipped) {
my $r = $_;
- printf "TESTINFO: \"%s\" %d times (", $r, $skipped{$_};
+ my $skip_count = $skipped{$r};
+ my $log_line = sprintf("TESTINFO: \"%s\" %d time%s (", $r, $skip_count,
+ ($skip_count == 1) ? "" : "s");
- # now show all test case numbers that had this reason for being
+ # now gather all test case numbers that had this reason for being
# skipped
my $c=0;
my $max = 9;
for(0 .. scalar @teststat) {
my $t = $_;
- if($teststat[$_] && ($teststat[$_] eq $r)) {
+ if($teststat[$t] && ($teststat[$t] eq $r)) {
if($c < $max) {
- logmsg ", " if($c);
- logmsg $_;
+ $log_line .= ", " if($c);
+ $log_line .= $t;
}
$c++;
}
}
if($c > $max) {
- logmsg " and ".($c-$max)." more";
+ $log_line .= " and ".($c-$max)." more";
}
- logmsg ")\n";
+ $log_line .= ")\n";
+ $restraints{$log_line} = $skip_count;
+ }
+ foreach my $log_line (sort {$restraints{$b} <=> $restraints{$a}} keys %restraints) {
+ logmsg $log_line;
+ }
+}
+
+if($total) {
+ logmsg sprintf("TESTDONE: $ok tests out of $total reported OK: %d%%\n",
+ $ok/$total*100);
+
+ if($ok != $total) {
+ logmsg "\nTESTFAIL: These test cases failed: $failed\n\n";
+ }
+}
+else {
+ logmsg "\nTESTFAIL: No tests were performed\n\n";
+ if(scalar(keys %enabled_keywords)) {
+ logmsg "TESTFAIL: Nothing matched these keywords: ";
+ for(keys %enabled_keywords) {
+ logmsg "$_ ";
+ }
+ logmsg "\n";
}
}