diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
index 8812cab..f950656 100644
--- a/core/lib/Drupal/Core/DrupalKernel.php
+++ b/core/lib/Drupal/Core/DrupalKernel.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\Core;
 
+use Drupal\Component\Utility\Settings;
 use Drupal\Core\PhpStorage\PhpStorageFactory;
 use Drupal\Core\Config\BootstrapConfigStorageFactory;
 use Drupal\Core\Config\NullStorage;
@@ -300,8 +301,7 @@ protected function moduleData($module) {
 
       // If a module is within a profile directory but specifies another
       // profile for testing, it needs to be found in the parent profile.
-      $settings = $this->getConfigStorage()->read('simpletest.settings');
-      $parent_profile = !empty($settings['parent_profile']) ? $settings['parent_profile'] : NULL;
+      $parent_profile = Settings::get('test_parent_profile');
       if ($parent_profile && !isset($profiles[$parent_profile])) {
         // In case both profile directories contain the same extension, the
         // actual profile always has precedence.
diff --git a/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php b/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php
index 4873bac..20011af 100644
--- a/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php
+++ b/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php
@@ -218,8 +218,8 @@ public function setProfileDirectoriesFromSettings() {
     // For SimpleTest to be able to test modules packaged together with a
     // distribution we need to include the profile of the parent site (in
     // which test runs are triggered).
-    if (drupal_valid_test_ua() && !drupal_installation_attempted()) {
-      $testing_profile = \Drupal::config('simpletest.settings')->get('parent_profile');
+    if (drupal_valid_test_ua()) {
+      $testing_profile = Settings::get('test_parent_profile');
       if ($testing_profile && $testing_profile != $profile) {
         $this->profileDirectories[] = drupal_get_path('profile', $testing_profile);
       }
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/Tests/ParentProfileTest.php b/core/modules/simpletest/lib/Drupal/simpletest/Tests/ParentProfileTest.php
new file mode 100644
index 0000000..ec285e4
--- /dev/null
+++ b/core/modules/simpletest/lib/Drupal/simpletest/Tests/ParentProfileTest.php
@@ -0,0 +1,41 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\simpletest\Tests\ParentProfileTest.
+ */
+
+namespace Drupal\simpletest\Tests;
+
+use Drupal\Component\Utility\Settings;
+use Drupal\Core\Extension\ExtensionDiscovery;
+use Drupal\simpletest\DrupalUnitTestBase;
+
+/**
+ * Tests installation profile inheritance in tests.
+ */
+class ParentProfileTest extends DrupalUnitTestBase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Test parent profile',
+      'description' => 'Tests installation profile inheritance in tests.',
+      'group' => 'SimpleTest',
+    );
+  }
+
+  /**
+   * Tests that the test runner's profile is inherited.
+   */
+  function testParentProfile() {
+    $settings = Settings::getAll();
+    $settings['test_parent_profile'] = 'testing';
+    $settings['install_profile'] = 'minimal';
+    new Settings($settings);
+
+    $discovery = new ExtensionDiscovery();
+    $modules = $discovery->scan('module');
+    $this->assertTrue(isset($modules['drupal_system_listing_compatible_test']));
+  }
+
+}
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
index 61c54d1..69f2b60 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
@@ -787,14 +787,14 @@ protected function setUp() {
     // Save the original site directory path, so that extensions in the
     // site-specific directory can still be discovered in the test site
     // environment.
-    // @see \Drupal\Core\SystemListing::scan()
+    // @see \Drupal\Core\Extension\ExtensionDiscovery::scan()
     $settings['settings']['test_parent_site'] = (object) array(
       'value' => $this->originalSite,
       'required' => TRUE,
     );
     // Add the parent profile's search path to the child site's search paths.
     // @see \Drupal\Core\Extension\ExtensionDiscovery::getProfileDirectories()
-    $settings['conf']['simpletest.settings']['parent_profile'] = (object) array(
+    $settings['settings']['test_parent_profile'] = (object) array(
       'value' => $this->originalProfile,
       'required' => TRUE,
     );
