From: Ilia Alshanetsky Date: Thu, 24 Oct 2002 13:13:23 +0000 (+0000) Subject: Added failed test summary. X-Git-Tag: php-4.3.0pre2~102 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=26617f8b5f02a9bac6999e57315245626ccafb62;p=php Added failed test summary. --- 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) );