diff -u b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php --- b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php @@ -176,7 +176,7 @@ * Internal helper: stores the assert. * * @param $status - * Can be 'pass', 'fail', 'exception'. + * Can be 'pass', 'fail', 'exception', 'debug'. * TRUE is a synonym for 'pass', FALSE for 'fail'. * @param $message * (optional) A message to display with the assertion. Do not translate @@ -232,7 +232,7 @@ return TRUE; } else { - if ($this->dieOnFail) { + if ($this->dieOnFail && ($status == 'fail' || $status == 'exception')) { exit(1); } return FALSE; diff -u b/core/scripts/run-tests.sh b/core/scripts/run-tests.sh --- b/core/scripts/run-tests.sh +++ b/core/scripts/run-tests.sh @@ -366,7 +366,9 @@ $public_files = variable_get('file_public_path', conf_path() . '/files'); $test_directory = $public_files . '/simpletest/' . substr($db_prefix, 10); echo 'Simpletest database and files kept and test exited immediately on fail so should be reproducible if you change settings.php to use the database prefix '. $db_prefix . ' and config directories in '. $test_directory . "\n"; - exit(); + $args['keep-results'] = TRUE; + // Exit repeat loop immediately. + $args['repeat'] = -1; } } // Free-up space by removing any potentially created resources.