Index: modules/simpletest/simpletest.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.module,v
retrieving revision 1.92
diff -u -p -r1.92 simpletest.module
--- modules/simpletest/simpletest.module	30 Jul 2010 01:34:38 -0000	1.92
+++ modules/simpletest/simpletest.module	26 Aug 2010 13:21:02 -0000
@@ -221,9 +221,10 @@ function _simpletest_batch_finished($suc
     list($last_prefix, $last_test_class) = simpletest_last_test_get($test_id);
     simpletest_log_read($test_id, $last_prefix, $last_test_class);
 
-
     drupal_set_message(t('The test run did not successfully finish.'), 'error');
-    drupal_set_message(t('Use the <em>Clean environment</em> button to clean-up temporary files and tables.'), 'warning');
+    drupal_set_message(t('Use the %clean button to clean up temporary files and tables.', array(
+      '%clean' => t('Clean environment'),
+    )), 'warning');
   }
   module_invoke_all('test_group_finished');
 }
Index: modules/simpletest/simpletest.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.pages.inc,v
retrieving revision 1.31
diff -u -p -r1.31 simpletest.pages.inc
--- modules/simpletest/simpletest.pages.inc	24 Jul 2010 17:28:26 -0000	1.31
+++ modules/simpletest/simpletest.pages.inc	26 Aug 2010 14:19:02 -0000
@@ -209,7 +209,6 @@ function simpletest_result_form($form, &
   if (is_numeric($test_id) && !$results = simpletest_result_get($test_id)) {
     drupal_set_message(t('No test results to display.'), 'error');
     drupal_goto('admin/config/development/testing');
-    return $form;
   }
 
   // Load all classes and include CSS.
@@ -308,12 +307,12 @@ function simpletest_result_form($form, &
 
   // Catagorized test classes for to be used with selected filter value.
   $form['action']['filter_pass'] = array(
-    '#type' => 'hidden',
-    '#default_value' => implode(',', $filter['pass']),
+    '#type' => 'value',
+    '#value' => implode(',', $filter['pass']),
   );
   $form['action']['filter_fail'] = array(
-    '#type' => 'hidden',
-    '#default_value' => implode(',', $filter['fail']),
+    '#type' => 'value',
+    '#value' => implode(',', $filter['fail']),
   );
 
   $form['action']['op'] = array(
@@ -321,6 +320,12 @@ function simpletest_result_form($form, &
     '#value' => t('Run tests'),
   );
 
+  $form['action']['clean'] = array(
+    '#type' => 'submit',
+    '#value' => t('Clean environment'),
+    '#submit' => array('simpletest_clean_environment'),
+    '#access' => !empty($filter['fail']),
+  );
   $form['action']['return'] = array(
     '#type' => 'link',
     '#title' => t('Return to list'),
