diff options
Diffstat (limited to 'run-tests.php')
| -rwxr-xr-x | run-tests.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/run-tests.php b/run-tests.php index 2bb1898479..9907653974 100755 --- a/run-tests.php +++ b/run-tests.php @@ -154,14 +154,17 @@ function do_testing($argc, $argv) { } } - if ($total == 0) { + $counting = $total - $skipped; + + if ($counting <= 0) { writeln("No tests were run."); return; } $total_d = (double)$total; - $passed_p = 100 * ($passed / $total_d); - $failed_p = 100 * ($failed / $total_d); + $counting_d = (double)$counting; + $passed_p = 100 * ($passed / $counting_d); + $failed_p = 100 * ($failed / $counting_d); $skipped_p = 100 * ($skipped / $total_d); $passed_pstr = sprintf($passed_p < 10.0 ? "%1.1f" : "%3.0f", $passed_p); $failed_pstr = sprintf($failed_p < 10.0 ? "%1.1f" : "%3.0f", $failed_p); @@ -277,9 +280,11 @@ function compare_results($file1, $file2) { } while (!(feof($fp1) || feof($fp2))) { if (!feof($fp1) && trim($line1 = fgets($fp1, 10240)) != "") { + //print "adding line1 $line1\n"; $data1 .= $line1; } if (!feof($fp2) && trim($line2 = fgets($fp2, 10240)) != "") { + //print "adding line2 $line2\n"; $data2 .= $line2; } } |
