test-runner: better define --shell behavior
Specifically, this defines the behavior when --shell is used when no specific test is specified. In this case test-runner will assume the 'shell' test/sandbox should be used as the test environment as running all autotests with --shell is not useful or feasable.
This commit is contained in:
parent
00f0039232
commit
7acb910a26
|
@ -2261,6 +2261,22 @@ static void run_auto_tests(void)
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* --shell without any specific tests implies 'shell' test
|
||||||
|
*/
|
||||||
|
if (shell) {
|
||||||
|
char *config_dir_path;
|
||||||
|
config_dir_path = l_strdup_printf("%s/shell",
|
||||||
|
test_home_path);
|
||||||
|
|
||||||
|
if (!find_test_configuration(config_dir_path, 1,
|
||||||
|
test_config_map)) {
|
||||||
|
l_free(config_dir_path);
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
l_free(config_dir_path);
|
||||||
} else {
|
} else {
|
||||||
l_info("Automatic test execution requested");
|
l_info("Automatic test execution requested");
|
||||||
l_info("Searching for the test configurations...");
|
l_info("Searching for the test configurations...");
|
||||||
|
@ -2269,6 +2285,7 @@ static void run_auto_tests(void)
|
||||||
test_config_map))
|
test_config_map))
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (l_hashmap_isempty(test_config_map)) {
|
if (l_hashmap_isempty(test_config_map)) {
|
||||||
l_error("No test configuration discovered");
|
l_error("No test configuration discovered");
|
||||||
|
@ -2769,7 +2786,14 @@ static void usage(void)
|
||||||
" executable\n"
|
" executable\n"
|
||||||
"\t-w, --hw <config> Run using a physical hardware "
|
"\t-w, --hw <config> Run using a physical hardware "
|
||||||
"configuration\n"
|
"configuration\n"
|
||||||
"\t-s, --shell Boot into shell, not autotests\n");
|
"\t-s, --shell Boot into shell. If -A is used the"
|
||||||
|
" environment\n"
|
||||||
|
"\t\t\t\twill be setup exactly as it is"
|
||||||
|
" in the test,\n"
|
||||||
|
"\t\t\t\tbut no test will be run. If no"
|
||||||
|
" test is specified\n"
|
||||||
|
"\t\t\t\tthe 'shell' test"
|
||||||
|
" will be used");
|
||||||
l_info("Commands:\n"
|
l_info("Commands:\n"
|
||||||
"\t-A, --auto-tests <dirs> Comma separated list of the "
|
"\t-A, --auto-tests <dirs> Comma separated list of the "
|
||||||
"test configuration\n\t\t\t\t"
|
"test configuration\n\t\t\t\t"
|
||||||
|
|
Loading…
Reference in New Issue