summaryrefslogtreecommitdiff
path: root/run-tests.php
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-12-29 16:07:08 (GMT)
committerMarcus Boerger <helly@php.net>2003-12-29 16:07:08 (GMT)
commitd001928aa29cb69f88492e83b02cedb389801a20 (patch)
treeb2f18b68370754e87a5a0482f6aae83a66717da7 /run-tests.php
parentfae56fca309332124c015febb49124df9c592db2 (diff)
downloadphp-d001928aa29cb69f88492e83b02cedb389801a20.tar.gz
Align output if one section shows 100% and display percentages when not
counting skipped tests.
Diffstat (limited to 'run-tests.php')
-rwxr-xr-xrun-tests.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/run-tests.php b/run-tests.php
index 55b4528..b1ace65 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -1111,6 +1111,11 @@ function get_summary($show_ext_summary)
{
global $exts_skipped, $exts_tested, $n_total, $sum_results, $percent_results, $end_time, $start_time, $failed_test_summary, $PHP_FAILED_TESTS;
+ $x_total = $n_total - $sum_results['SKIPPED'] - $sum_results['BORKED'];
+ $x_warned = (100.0 * $sum_results['FAILED']) / $x_total;
+ $x_failed = (100.0 * $sum_results['FAILED']) / $x_total;
+ $x_passed = (100.0 * $sum_results['PASSED']) / $x_total;
+
$summary = "";
if ($show_ext_summary) {
$summary .= "
@@ -1123,16 +1128,16 @@ Exts tested : " . sprintf("%4d",$exts_tested) . "
";
}
$summary .= "
-Number of tests : " . sprintf("%4d",$n_total);
+Number of tests : " . sprintf("%4d",$n_total). " " . sprintf("%8d",$x_total);
if ($sum_results['BORKED']) {
$summary .= "
-Tests borked : " . sprintf("%4d (%2.1f%%)",$sum_results['BORKED'],$percent_results['BORKED']);
+Tests borked : " . sprintf("%4d (%3.1f%%)",$sum_results['BORKED'],$percent_results['BORKED']) . " --------";
}
$summary .= "
-Tests skipped : " . sprintf("%4d (%2.1f%%)",$sum_results['SKIPPED'],$percent_results['SKIPPED']) . "
-Tests warned : " . sprintf("%4d (%2.1f%%)",$sum_results['WARNED'],$percent_results['WARNED']) . "
-Tests failed : " . sprintf("%4d (%2.1f%%)",$sum_results['FAILED'],$percent_results['FAILED']) . "
-Tests passed : " . sprintf("%4d (%2.1f%%)",$sum_results['PASSED'],$percent_results['PASSED']) . "
+Tests skipped : " . sprintf("%4d (%3.1f%%)",$sum_results['SKIPPED'],$percent_results['SKIPPED']) . " --------
+Tests warned : " . sprintf("%4d (%3.1f%%)",$sum_results['WARNED'],$percent_results['WARNED']) . " " . sprintf("(%3.1f%%)",$x_warned) . "
+Tests failed : " . sprintf("%4d (%3.1f%%)",$sum_results['FAILED'],$percent_results['FAILED']) . " " . sprintf("(%3.1f%%)",$x_failed) . "
+Tests passed : " . sprintf("%4d (%3.1f%%)",$sum_results['PASSED'],$percent_results['PASSED']) . " " . sprintf("(%3.1f%%)",$x_passed) . "
---------------------------------------------------------------------
Time taken : " . sprintf("%4d seconds", $end_time - $start_time) . "
=====================================================================