Commit:    16efc77608789234c92c1cad906417d06ec3428d
Author:    Xinchen Hui <larue...@php.net>         Sun, 25 Nov 2012 16:18:20 
+0800
Parents:   11c946e594a218143a6dafb302c70f2adade96d7
Branches:  PHP-5.5

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=16efc77608789234c92c1cad906417d06ec3428d

Log:
count($test_files) already be checked above : if ($test_cnt)

thus we can use $sum_results instead of the preg_match

Changed paths:
  M  run-tests.php


Diff:
diff --git a/run-tests.php b/run-tests.php
index 43470d0..8b7fa7f 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -802,14 +802,12 @@ HELP;
                        fclose($failed_tests_file);
                }
 
-               if (count($test_files) || count($test_results)) {
-                       compute_summary();
-                       if ($html_output) {
-                               fwrite($html_file, "<hr/>\n" . 
get_summary(false, true));
-                       }
-                       echo 
"=====================================================================";
-                       echo get_summary(false, false);
+               compute_summary();
+               if ($html_output) {
+                       fwrite($html_file, "<hr/>\n" . get_summary(false, 
true));
                }
+               echo 
"=====================================================================";
+               echo get_summary(false, false);
 
                if ($html_output) {
                        fclose($html_file);
@@ -821,7 +819,7 @@ HELP;
 
                junit_save_xml();
 
-               if (getenv('REPORT_EXIT_STATUS') == 1 and preg_match('/ 
FAILED(?: |$)/', implode(' ', $test_results))) {
+               if (getenv('REPORT_EXIT_STATUS') == 1 and 
$sum_results['FAILED']) {
                        exit(1);
                }


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

Reply via email to