iliaa           Thu Oct 24 09:13:24 2002 EDT

  Modified files:              
    /php4       run-tests.php 
  Log:
  Added failed test summary.
  
  
Index: php4/run-tests.php
diff -u php4/run-tests.php:1.87 php4/run-tests.php:1.88
--- php4/run-tests.php:1.87     Thu Oct 24 05:06:31 2002
+++ php4/run-tests.php  Thu Oct 24 09:13:23 2002
@@ -248,6 +248,24 @@
 =====================================================================
 ";
 
+$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', '[EMAIL PROTECTED]');
 define('QA_SUBMISSION_PAGE', 'http://qa.php.net/buildtest-process.php');
 
@@ -276,6 +294,8 @@
                $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 @@
 
        $GLOBALS['__PHP_FAILED_TESTS__'][] = array(
                                                'name' => $file,
+                                               'test_name' => $tested,
                                                'output' => 
ereg_replace('\.phpt$','.log', $file),
                                                'diff'   => 
ereg_replace('\.phpt$','.diff', $file)
                                                );



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to