Index: modules/simpletest/simpletest.module =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.module,v retrieving revision 1.93 diff -u -p -r1.93 simpletest.module --- modules/simpletest/simpletest.module 1 Sep 2010 20:08:17 -0000 1.93 +++ modules/simpletest/simpletest.module 22 Sep 2010 18:46:13 -0000 @@ -1,5 +1,5 @@ execute(); // Clear out the previous verbose files. - file_unmanaged_delete_recursive('public://simpletest/verbose'); + file_unmanaged_delete_recursive(file_directory_path() . '/simpletest/verbose'); // Get the info for the first test being run. $first_test = array_shift($test_list); @@ -367,8 +367,14 @@ function simpletest_test_get_all() { function simpletest_registry_files_alter(&$files, $modules) { foreach ($modules as $module) { // Only add test files for disabled modules, as enabled modules should - // already include any test files they provide. - if (!$module->status) { + // already include any test files they provide. Ensure the module is either + // a profile (has a .profile file) or is not in the profiles directory. The + // testing system cannot test modules in a profile since the profile has to + // be enable during the test for the modules to be available, as such the + // profile itself is the only one capable of testing the modules in the + // profile since its test will use itself as the profile. + if (!$module->status && + (in_array($module->name . '.profile', $module->info['files']) || substr($module->dir, 0, 8) != 'profiles')) { $dir = $module->dir; if (!empty($module->info['files'])) { foreach ($module->info['files'] as $file) { @@ -406,7 +412,7 @@ function simpletest_generate_file($filen $text = wordwrap($text, $width - 1, "\n", TRUE) . "\n"; // Add \n for symetrical file. // Create filename. - file_put_contents('public://' . $filename . '.txt', $text); + file_put_contents(file_directory_path() . '/' . $filename . '.txt', $text); return $filename; }