From 77a6a2620bbf35de102f829ad2d9bffaaa36272e Mon Sep 17 00:00:00 2001 From: Nathaniel Catchpole <catch@35733.no-reply.drupal.org> Date: Fri, 6 Feb 2015 15:29:51 +0000 Subject: [PATCH] Issue #2421335 by alexpott: Using run-tests.sh with the --list option should not require a db (of any kind) --- core/scripts/run-tests.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh index ac3ba0cb483d..4e35b28ab055 100644 --- a/core/scripts/run-tests.sh +++ b/core/scripts/run-tests.sh @@ -41,6 +41,20 @@ exit; } +if ($args['list']) { + // Display all available tests. + echo "\nAvailable test groups & classes\n"; + echo "-------------------------------\n\n"; + $groups = simpletest_test_get_all($args['module']); + foreach ($groups as $group => $tests) { + echo $group . "\n"; + foreach ($tests as $class => $info) { + echo " - $class\n"; + } + } + exit; +} + simpletest_script_setup_database(TRUE); if ($args['clean']) { @@ -56,20 +70,6 @@ exit; } -if ($args['list']) { - // Display all available tests. - echo "\nAvailable test groups & classes\n"; - echo "-------------------------------\n\n"; - $groups = simpletest_test_get_all($args['module']); - foreach ($groups as $group => $tests) { - echo $group . "\n"; - foreach ($tests as $class => $info) { - echo " - $class\n"; - } - } - exit; -} - $test_list = simpletest_script_get_test_list(); // Try to allocate unlimited time to run the tests. -- GitLab