3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 06:29:23 +01:00

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:
James Prestwood 2019-08-28 12:33:33 -07:00 committed by Denis Kenzior
parent 00f0039232
commit 7acb910a26

View File

@ -2261,6 +2261,22 @@ static void run_auto_tests(void)
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 {
l_info("Automatic test execution requested");
l_info("Searching for the test configurations...");
@ -2269,6 +2285,7 @@ static void run_auto_tests(void)
test_config_map))
goto exit;
}
}
if (l_hashmap_isempty(test_config_map)) {
l_error("No test configuration discovered");
@ -2769,7 +2786,14 @@ static void usage(void)
" executable\n"
"\t-w, --hw <config> Run using a physical hardware "
"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"
"\t-A, --auto-tests <dirs> Comma separated list of the "
"test configuration\n\t\t\t\t"