Skip to content
Snippets Groups Projects
Commit d952784d authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #254166 by boombatower and pwlonin: added --list feature to list all...

- Patch #254166 by boombatower and pwlonin: added --list feature to list all available test groups and fixed some indentation issues.
parent 493a9ac6
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
--help Print this page. --help Print this page.
--list Display all available test groups.
--clean Cleans up database tables or directories from previous, failed, --clean Cleans up database tables or directories from previous, failed,
tests and then exits (no tests are run). tests and then exits (no tests are run).
...@@ -61,6 +63,7 @@ ...@@ -61,6 +63,7 @@
exit; exit;
} }
$list = FALSE;
$clean = FALSE; $clean = FALSE;
$all = FALSE; $all = FALSE;
$class_names = FALSE; $class_names = FALSE;
...@@ -68,6 +71,9 @@ ...@@ -68,6 +71,9 @@
while ($param = array_shift($_SERVER['argv'])) { while ($param = array_shift($_SERVER['argv'])) {
switch ($param) { switch ($param) {
case '--list':
$list = TRUE;
break;
case '--url': case '--url':
$url = array_shift($_SERVER['argv']); $url = array_shift($_SERVER['argv']);
$parsed = parse_url($url); $parsed = parse_url($url);
...@@ -133,6 +139,15 @@ ...@@ -133,6 +139,15 @@
$test_instances = $total_test->getTestInstances(); $test_instances = $total_test->getTestInstances();
if ($list) {
// Display all availabe tests.
echo("Available test groups:\n----------------------\n");
foreach ($test_instances as $group_test) {
echo($group_test->getLabel() . "\n");
}
exit;
}
if ($all) { if ($all) {
$test_list = NULL; $test_list = NULL;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment