diff --git a/core/modules/simpletest/config/simpletest.settings.yml b/core/modules/simpletest/config/simpletest.settings.yml
index ca18891..52b2d3d 100644
--- a/core/modules/simpletest/config/simpletest.settings.yml
+++ b/core/modules/simpletest/config/simpletest.settings.yml
@@ -1,5 +1,4 @@
 clear_results: '1'
-die_on_fail: '0'
 httpauth:
   method: '1'
   password: ''
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
index b337e4c..e37b96a 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
@@ -144,11 +144,13 @@
   protected $originalSettings;
 
   /**
-   * TRUE if die on fail enabled.
+   * Whether to die in case any test assertion fails.
+   *
+   * @see run-tests.sh
    *
    * @var boolean
    */
-  protected $dieOnFail = FALSE;
+  public $dieOnFail = FALSE;
 
   /**
    * Constructor for Test.
@@ -670,7 +672,6 @@ public function run(array $methods = array()) {
       }
       $this->verboseClassName = str_replace("\\", "_", $class);
     }
-    $this->dieOnFail = $simpletest_config->get('die_on_fail');
     // HTTP auth settings (<username>:<password>) for the simpletest browser
     // when sending requests to the test site.
     $this->httpauth_method = (int) $simpletest_config->get('httpauth.method');
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index 281300b..33eb121 100755
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -69,8 +69,8 @@
 simpletest_script_reporter_init();
 
 // Execute tests.
-for($test_run = 0; $test_run < $args['repeat']; $test_run++) {
-  simpletest_script_execute_batch(simpletest_script_get_test_list());
+for ($i = 0; $i < $args['repeat']; $i++) {
+  simpletest_script_execute_batch($test_list);
 }
 
 // Stop the timer.
@@ -152,9 +152,10 @@ function simpletest_script_help() {
 
   --die-on-fail
 
-              Exit out of php execution immediately on fail. This allows user to
-              change settings.php to use simpletest created databases and debug
-              failure. This is often used with repeat to find random failures.
+              Exit test execution immediately upon any failed assertion. This
+              allows to access the test site by changing settings.php to use the
+              test database and configuration directories. Use in combination
+              with --repeat for debugging random test failures.
 
   <test1>[,<test2>[,<test3> ...]]
 
@@ -212,9 +213,6 @@ function simpletest_script_parse_args() {
   // Override with set values.
   $args['script'] = basename(array_shift($_SERVER['argv']));
 
-  // Provide a default for repeat argument.
-  $args['repeat'] = 1;
-
   $count = 0;
   while ($arg = array_shift($_SERVER['argv'])) {
     if (preg_match('/--(\S+)/', $arg, $matches)) {
@@ -398,9 +396,9 @@ function simpletest_script_run_one_test($test_id, $test_class) {
     // Override configuration according to command line parameters.
     $conf['simpletest.settings']['verbose'] = $args['verbose'];
     $conf['simpletest.settings']['clear_results'] = !$args['keep-results'];
-    $conf['simpletest.settings']['die_on_fail'] = $args['die-on-fail'];
 
     $test = new $test_class($test_id);
+    $test->dieOnFail = (bool) $args['die-on-fail'];
     $test->run();
     $info = $test->getInfo();
 
