diff options
author | Petri Latvala <petri.latvala@intel.com> | 2018-09-20 13:55:07 +0300 |
---|---|---|
committer | Petri Latvala <petri.latvala@intel.com> | 2018-09-21 13:33:51 +0300 |
commit | 19b0c74d20d9b53d4c82be14af0909a3b6846010 (patch) | |
tree | 917e4416cbde42cbe64099488544bc621aca9276 /runner | |
parent | 8dab213b5352bf7ba93e20032025cad2610b10ac (diff) |
runner: Support -t and -x with a --test-list
Actually implement what was already commented to work.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Acked-by: Tomi Sarvela <tomi.p.sarvela@intel.com> #irc
Diffstat (limited to 'runner')
-rw-r--r-- | runner/job_list.c | 6 | ||||
-rw-r--r-- | runner/runner_tests.c | 20 |
2 files changed, 26 insertions, 0 deletions
diff --git a/runner/job_list.c b/runner/job_list.c index 9cf19c45..97bbb0be 100644 --- a/runner/job_list.c +++ b/runner/job_list.c @@ -211,6 +211,12 @@ static bool job_list_from_test_list(struct job_list *job_list, if ((delim = strchr(line, '#')) != NULL) *delim = '\0'; + if (settings->exclude_regexes.size && matches_any(line, &settings->exclude_regexes)) + continue; + + if (settings->include_regexes.size && !matches_any(line, &settings->include_regexes)) + continue; + if (sscanf(line, "igt@%ms", &binary) == 1) { if ((delim = strchr(binary, '@')) != NULL) *delim++ = '\0'; diff --git a/runner/runner_tests.c b/runner/runner_tests.c index 1a95a75a..b03f2acf 100644 --- a/runner/runner_tests.c +++ b/runner/runner_tests.c @@ -562,6 +562,26 @@ igt_main igt_assert_eqstr(list.entries[0].subtests[0], "first-subtest"); igt_assert_eqstr(list.entries[multiple ? 0 : 1].subtests[multiple ? 1 : 0], "second-subtest"); } + + igt_subtest_f("job-list-testlist-filtered-%s", multiple ? "multiple" : "normal") { + char *argv[] = { "runner", + "--test-list", filename, + multiple ? "--multiple-mode" : "--sync", + "-t", "successtest", + "-x", "first", + testdatadir, + "path-to-results", + }; + + igt_assert(parse_options(ARRAY_SIZE(argv), argv, &settings)); + igt_assert(create_job_list(&list, &settings)); + + igt_assert_eq(list.size, 1); + igt_assert_eqstr(list.entries[0].binary, "successtest"); + + igt_assert_eq(list.entries[0].subtest_count, 1); + igt_assert_eqstr(list.entries[0].subtests[0], "second-subtest"); + } } igt_fixture { |