diff options
author | Petri Latvala <adrinael@adrinael.net> | 2023-10-20 16:30:39 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-10-30 14:37:59 +0100 |
commit | 1aa0ed3e02945fbbfe54183b60d0add06b1669d9 (patch) | |
tree | dda49a9f6804c172d1106e6b56ddb7df2920b971 /runner | |
parent | 0b3297184517ae2d070a531da9ac45206eda0b65 (diff) |
runner: Normalize testlist entries that don't list subtests
As the syntax for "all subtests" and "test that doesn't have subtests"
is the same, check the subtest listing when building the execution
plan. Doing that makes it possible to still have "all subtests" in
testlists (albeit not originally designed to support that) and enables
blocklisting particular subtests.
Signed-off-by: Petri Latvala <adrinael@adrinael.net>
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Arkadiusz Hiler <arek@hiler.eu>
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Closes: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/149
Diffstat (limited to 'runner')
-rw-r--r-- | runner/job_list.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/runner/job_list.c b/runner/job_list.c index e6ea83631..27cbb10bc 100644 --- a/runner/job_list.c +++ b/runner/job_list.c @@ -230,8 +230,28 @@ static bool job_list_from_test_list(struct job_list *job_list, continue; if (sscanf(line, "igt@%ms", &binary) == 1) { - if ((delim = strchr(binary, '@')) != NULL) + if ((delim = strchr(binary, '@')) != NULL) { *delim++ = '\0'; + } else { + /* + * No subtests specified. Check + * whether the user means "all + * subtests" or if the test doesn't + * have any. + */ + if (entry.binary) { + /* First flush the entry we're building for multiple-mode */ + add_job_list_entry(job_list, entry.binary, entry.subtests, entry.subtest_count); + memset(&entry, 0, sizeof(entry)); + any = true; + } + + add_subtests(job_list, settings, binary, + &settings->include_regexes, + &settings->exclude_regexes); + any = true; + continue; + } if (!settings->multiple_mode) { char **subtests = NULL; |