summaryrefslogtreecommitdiff
path: root/scripts/run-tests.sh
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-06-08 09:23:55 +0000
committerDries Buytaert <dries@buytaert.net>2009-06-08 09:23:55 +0000
commite9d97f1eef493de9b9cb3ae456175ce33b5cb796 (patch)
tree3796e7622e33162c71567c48785b887d2f9f433e /scripts/run-tests.sh
parentb9ed1bc6e64fe82019c92cb582feb0b396dc96a7 (diff)
downloadbrdo-e9d97f1eef493de9b9cb3ae456175ce33b5cb796.tar.gz
brdo-e9d97f1eef493de9b9cb3ae456175ce33b5cb796.tar.bz2
- Patch #449198 by boombatower: cealn up test loading and related API.
Diffstat (limited to 'scripts/run-tests.sh')
-rwxr-xr-xscripts/run-tests.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh
index 795c67886..ada07c75c 100755
--- a/scripts/run-tests.sh
+++ b/scripts/run-tests.sh
@@ -44,8 +44,11 @@ if ($args['clean']) {
}
// Load SimpleTest files.
-$all_tests = simpletest_get_all_tests();
-$groups = simpletest_categorize_tests($all_tests);
+$groups = simpletest_test_get_all();
+$all_tests = array();
+foreach ($groups as $group => $tests) {
+ $all_tests = array_merge($all_tests, array_keys($tests));
+}
$test_list = array();
if ($args['list']) {
@@ -54,8 +57,8 @@ if ($args['list']) {
echo "-------------------------------\n\n";
foreach ($groups as $group => $tests) {
echo $group . "\n";
- foreach ($tests as $class_name => $info) {
- echo " - " . $info['name'] . ' (' . $class_name . ')' . "\n";
+ foreach ($tests as $class => $info) {
+ echo " - " . $info['name'] . ' (' . $class . ')' . "\n";
}
}
exit;
@@ -339,7 +342,6 @@ function simpletest_script_execute_batch() {
* Run a single test (assume a Drupal bootstrapped environment).
*/
function simpletest_script_run_one_test($test_id, $test_class) {
- simpletest_get_all_tests();
$test = new $test_class($test_id);
$test->run();
$info = $test->getInfo();