Index: drupal_web_test_case.php =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/Attic/drupal_web_test_case.php,v retrieving revision 1.3.2.3 diff -u -r1.3.2.3 drupal_web_test_case.php --- drupal_web_test_case.php 4 Nov 2009 16:36:03 -0000 1.3.2.3 +++ drupal_web_test_case.php 9 Nov 2009 20:56:36 -0000 @@ -1034,6 +1034,7 @@ $this->originalPrefix = $db_prefix; $this->originalFileDirectory = file_directory_path(); $this->originalProfile = drupal_get_profile(); + $this->removeTables = variable_get('simpletest_remove_tables', TRUE); $clean_url_original = variable_get('clean_url', 0); // Generate temporary prefixed database to ensure that tests have a clean starting point. @@ -1176,11 +1177,12 @@ // Delete temporary files directory. file_unmanaged_delete_recursive($this->originalFileDirectory . '/' . $db_prefix); - // Remove all prefixed tables (all the tables in the schema). - $schema = drupal_get_schema(NULL, TRUE); - $ret = array(); - foreach ($schema as $name => $table) { - db_drop_table($name); + if ($this->removeTables) { + // Remove all prefixed tables (all the tables in the schema). + $schema = drupal_get_schema(NULL, TRUE); + foreach ($schema as $name => $table) { + db_drop_table($name); + } } // Return the database prefix to the original. Index: simpletest.pages.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/Attic/simpletest.pages.inc,v retrieving revision 1.1.4.3 diff -u -r1.1.4.3 simpletest.pages.inc --- simpletest.pages.inc 6 Nov 2009 22:15:45 -0000 1.1.4.3 +++ simpletest.pages.inc 9 Nov 2009 20:56:36 -0000 @@ -441,6 +441,12 @@ '#description' => t('By default SimpleTest will clear the results after they have been viewed on the results page, but in some cases it may be useful to leave the results in the database. The results can then be viewed at admin/config/development/testing/[test_id]. The test ID can be found in the database, simpletest table, or kept track of when viewing the results the first time. Additionally, some modules may provide more analaysis or features that require this setting to be disabled.'), '#default_value' => variable_get('simpletest_clear_results', TRUE), ); + $form['general']['simpletest_remove_tables'] = array( + '#type' => 'checkbox', + '#title' => t('Remove prefixed tables after each complete test suite run'), + '#description' => t('By default SimpleTest will remove the prefixed tables created during testing, but in some cases it may be useful to leave the tables in the database.'), + '#default_value' => variable_get('simpletest_remove_tables', TRUE), + ); $form['general']['simpletest_verbose'] = array( '#type' => 'checkbox', '#title' => t('Provide verbose information when running tests'),