/* subtests helpers */
static bool list_subtests = false;
static char *run_single_subtest = NULL;
+static bool run_single_subtest_found = false;
static const char *in_subtest = NULL;
static bool in_fixture = false;
static bool test_with_subtests = false;
return false;
}
- if (run_single_subtest &&
- strcmp(subtest_name, run_single_subtest) != 0)
- return false;
+ if (run_single_subtest) {
+ if (strcmp(subtest_name, run_single_subtest) != 0)
+ return false;
+ else
+ run_single_subtest_found = true;
+ }
+
+
if (skip_subtests_henceforth) {
printf("Subtest %s: %s\n", subtest_name,
{
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())
exit(IGT_EXIT_SUCCESS);