]> granicus.if.org Git - php/commitdiff
Added failed test summary.
authorIlia Alshanetsky <iliaa@php.net>
Thu, 24 Oct 2002 13:13:23 +0000 (13:13 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 24 Oct 2002 13:13:23 +0000 (13:13 +0000)
run-tests.php

index 0a9537a3dce9e97b29e707274168ae66dd03365b..777d875a66a1a54934948968999f027dce19d80c 100755 (executable)
@@ -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)
                                                );