? modules/simpletest/variable-profile-279455-1.patch
Index: modules/simpletest/drupal_web_test_case.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/drupal_web_test_case.php,v
retrieving revision 1.25
diff -u -p -r1.25 drupal_web_test_case.php
--- modules/simpletest/drupal_web_test_case.php	5 Jul 2008 07:19:31 -0000	1.25
+++ modules/simpletest/drupal_web_test_case.php	7 Jul 2008 18:27:00 -0000
@@ -633,14 +633,19 @@ class DrupalWebTestCase {
     include_once './includes/install.inc';
     drupal_install_system();
 
-    // Add the specified modules to the list of modules in the default profile.
+    $profile = variable_get('web_test_case_profile', 'default');
+    // Use the default profile if the specified one is missing.
+    if (!file_exists("./profiles/$profile/$profile.profile")) {
+      $profile = 'default';
+    }
+    // Add the specified modules to the list of modules in the specified profile.
     $args = func_get_args();
-    $modules = array_unique(array_merge(drupal_verify_profile('default', 'en'), $args));
+    $modules = array_unique(array_merge(drupal_verify_profile($profile, 'en'), $args));
     drupal_install_modules($modules);
 
-    // Run default profile tasks.
+    // Run the specified profile's tasks.
     $task = 'profile';
-    default_profile_tasks($task, '');
+    call_user_func($profile .'_profile_tasks', $task, '');
 
     // Rebuild caches.
     menu_rebuild();
@@ -650,7 +655,7 @@ class DrupalWebTestCase {
     $this->checkPermissions(array(), TRUE);
 
     // Restore necessary variables.
-    variable_set('install_profile', 'default');
+    variable_set('install_profile', $profile);
     variable_set('install_task', 'profile-finished');
     variable_set('clean_url', $clean_url_original);
 
