mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-12 10:26:12 +00:00
lib: warn when attempting to run an unknown subtest
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
This commit is contained in:
parent
bf57e93f50
commit
e057b86109
@ -204,6 +204,7 @@ static unsigned int exit_handler_count;
|
|||||||
/* subtests helpers */
|
/* subtests helpers */
|
||||||
static bool list_subtests = false;
|
static bool list_subtests = false;
|
||||||
static char *run_single_subtest = NULL;
|
static char *run_single_subtest = NULL;
|
||||||
|
static bool run_single_subtest_found = false;
|
||||||
static const char *in_subtest = NULL;
|
static const char *in_subtest = NULL;
|
||||||
static bool in_fixture = false;
|
static bool in_fixture = false;
|
||||||
static bool test_with_subtests = false;
|
static bool test_with_subtests = false;
|
||||||
@ -484,9 +485,14 @@ bool __igt_run_subtest(const char *subtest_name)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (run_single_subtest &&
|
if (run_single_subtest) {
|
||||||
strcmp(subtest_name, run_single_subtest) != 0)
|
if (strcmp(subtest_name, run_single_subtest) != 0)
|
||||||
return false;
|
return false;
|
||||||
|
else
|
||||||
|
run_single_subtest_found = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (skip_subtests_henceforth) {
|
if (skip_subtests_henceforth) {
|
||||||
printf("Subtest %s: %s\n", subtest_name,
|
printf("Subtest %s: %s\n", subtest_name,
|
||||||
@ -722,6 +728,12 @@ void igt_exit(void)
|
|||||||
{
|
{
|
||||||
igt_exit_called = true;
|
igt_exit_called = true;
|
||||||
|
|
||||||
|
if (run_single_subtest && !run_single_subtest_found) {
|
||||||
|
igt_warn("Unknown subtest: %s\n", run_single_subtest);
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (igt_only_list_subtests())
|
if (igt_only_list_subtests())
|
||||||
exit(IGT_EXIT_SUCCESS);
|
exit(IGT_EXIT_SUCCESS);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user