diff --git a/run-tests.php b/run-tests.php
index 43470d0d8ad5..8b7fa7f8be55 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -802,14 +802,12 @@ function save_or_mail_results()
fclose($failed_tests_file);
}
- if (count($test_files) || count($test_results)) {
- compute_summary();
- if ($html_output) {
- fwrite($html_file, "
\n" . get_summary(false, true));
- }
- echo "=====================================================================";
- echo get_summary(false, false);
+ compute_summary();
+ if ($html_output) {
+ fwrite($html_file, "
\n" . get_summary(false, true));
}
+ echo "=====================================================================";
+ echo get_summary(false, false);
if ($html_output) {
fclose($html_file);
@@ -821,7 +819,7 @@ function save_or_mail_results()
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);
}