summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2002-10-24 13:13:23 +0000
committerIlia Alshanetsky <iliaa@php.net>2002-10-24 13:13:23 +0000
commit26617f8b5f02a9bac6999e57315245626ccafb62 (patch)
treefbf957548104c538afcdf939ef5b65159a6b01f1
parentbeffb8164c3433a03587c271e7c9b7d7ef15aa5f (diff)
downloadphp-git-26617f8b5f02a9bac6999e57315245626ccafb62.tar.gz
Added failed test summary.
-rwxr-xr-xrun-tests.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/run-tests.php b/run-tests.php
index 0a9537a3dc..777d875a66 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -248,6 +248,24 @@ Time taken : " . sprintf("%4d seconds", $end_time - $start_time) . "
=====================================================================
";
+$failed_test_summary = '';
+if (count($GLOBALS['__PHP_FAILED_TESTS__'])) {
+$failed_test_summary .= "
+=====================================================================
+FAILED TEST SUMMARY
+---------------------------------------------------------------------
+";
+foreach ($GLOBALS['__PHP_FAILED_TESTS__'] as $failed_test_data) {
+$failed_test_summary .= $failed_test_data['test_name'] . "\n";
+}
+$failed_test_summary .= "=====================================================================
+";
+}
+
+if ($failed_test_summary && !getenv('NO_PHPTEST_SUMMARY')) {
+ echo $failed_test_summary;
+}
+
define('PHP_QA_EMAIL', 'php-qa@lists.php.net');
define('QA_SUBMISSION_PAGE', 'http://qa.php.net/buildtest-process.php');
@@ -276,6 +294,8 @@ if ($sum_results['FAILED'] && !getenv('NO_INTERACTION')) {
$failed_tests_data .= "Compiler:\n". shell_exec(getenv('CC').' -v 2>&1'). "\n";
$failed_tests_data .= "\n\n";
+ $failed_tests_data .= $failed_test_summary . "\n";
+
foreach ($GLOBALS['__PHP_FAILED_TESTS__'] as $test_info) {
$failed_tests_data .= $sep . $test_info['name'];
$failed_tests_data .= $sep . file_get_contents(realpath($test_info['output']));
@@ -576,6 +596,7 @@ COMMAND $cmd
$GLOBALS['__PHP_FAILED_TESTS__'][] = array(
'name' => $file,
+ 'test_name' => $tested,
'output' => ereg_replace('\.phpt$','.log', $file),
'diff' => ereg_replace('\.phpt$','.diff', $file)
);