summaryrefslogtreecommitdiff
path: root/run-tests.php
diff options
context:
space:
mode:
authorStig Bakken <ssb@php.net>2000-08-31 22:21:47 +0000
committerStig Bakken <ssb@php.net>2000-08-31 22:21:47 +0000
commit1bb90f5805ea471dd85ee0806203d3fe71059630 (patch)
tree715d7d0190172aad98e4a67e86a7c105b7e9048a /run-tests.php
parent88979a11c1c2ec094d05e035b9e21d4393a702ee (diff)
downloadphp-git-1bb90f5805ea471dd85ee0806203d3fe71059630.tar.gz
* all tests should pass now (expect for the interbase stuff that I haven't
had the chance to test)
Diffstat (limited to 'run-tests.php')
-rwxr-xr-xrun-tests.php11
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;
}
}