Index: simpletest.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/simpletest.module,v
retrieving revision 1.23
diff -u -p -r1.23 simpletest.module
--- simpletest.module	26 Jun 2007 02:42:01 -0000	1.23
+++ simpletest.module	26 Jun 2007 20:50:37 -0000
@@ -203,8 +203,9 @@ function simpletest_overview_form() {
  * @param array $testlist list of tests to run or DEFAULT NULL run all tests
  */
 function simpletest_run_tests($testlist = NULL) {
-  if (!defined("TEST_RUNNING")) {
-    define("TEST_RUNNING", true);
+  global $test_running;
+  if (!$test_running) {
+    $test_running = TRUE;
     $test = simpletest_get_total_test($testlist);
     if (SimpleReporter::inCli()) {
       cache_clear_all();
@@ -215,6 +216,7 @@ function simpletest_run_tests($testlist 
     cache_clear_all();
     $test->run($reporter);
 //    exit;
+    $test_running = FALSE;
     return $reporter->getOutput();
   }
 }
