From 8140ed0d84b15156f10fff93430ddefa5dab91f3 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 30 Jul 2009 10:46:53 +0000 Subject: - Patch #443154 by boombatower, pwolanin: properly report fatal errors as failures. --- scripts/run-tests.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'scripts/run-tests.sh') diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh index 9e42d1dc4..37d3c4399 100755 --- a/scripts/run-tests.sh +++ b/scripts/run-tests.sh @@ -83,6 +83,12 @@ $test_id = db_insert('simpletest_test_id')->useDefaults(array('test_id'))->execu // Execute tests. simpletest_script_command($args['concurrency'], $test_id, implode(",", $test_list)); +// Retrieve the last database prefix used for testing and the last test class +// that was run from. Use the information to read the lgo file in case any +// fatal errors caused the test to crash. +list($last_prefix, $last_test_class) = simpletest_last_test_get($test_id); +simpletest_log_read($test_id, $last_prefix, $last_test_class); + // Display results before database is cleared. simpletest_script_reporter_display_results(); @@ -466,8 +472,6 @@ function simpletest_script_reporter_init() { function simpletest_script_reporter_display_results() { global $args, $test_id, $results_map; - simpletest_log_read($test_id); - echo "\n"; $end = timer_stop('run-tests'); echo "Test run duration: " . format_interval($end['time'] / 1000); -- cgit v1.2.3