igt-dev.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/1] runner: Match the piglit name with -t and -x options
@ 2018-08-14 12:38 Petri Latvala
  2018-08-14 13:25 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/1] " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Petri Latvala @ 2018-08-14 12:38 UTC (permalink / raw)
  To: igt-dev; +Cc: Tomi Sarvela

Instead of just matching the binary/subtest name.

Originally not implemented to get the runner landed faster. Turned out
to be simple enough.

Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
 runner/job_list.c     | 11 +++++++++--
 runner/runner_tests.c |  2 ++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/runner/job_list.c b/runner/job_list.c
index e3f820c3..5fe88e4f 100644
--- a/runner/job_list.c
+++ b/runner/job_list.c
@@ -74,13 +74,19 @@ static void add_subtests(struct job_list *job_list, struct settings *settings,
 	}
 
 	while (fscanf(p, "%ms", &subtestname) == 1) {
-		if (exclude && exclude->size && matches_any(subtestname, exclude)) {
+		char *piglitname;
+
+		asprintf(&piglitname, "igt@%s@%s", binary, subtestname);
+
+		if (exclude && exclude->size && matches_any(piglitname, exclude)) {
 			free(subtestname);
+			free(piglitname);
 			continue;
 		}
 
-		if (include && include->size && !matches_any(subtestname, include)) {
+		if (include && include->size && !matches_any(piglitname, include)) {
 			free(subtestname);
+			free(piglitname);
 			continue;
 		}
 
@@ -96,6 +102,7 @@ static void add_subtests(struct job_list *job_list, struct settings *settings,
 		}
 
 		free(subtestname);
+		free(piglitname);
 	}
 
 	if (num_subtests)
diff --git a/runner/runner_tests.c b/runner/runner_tests.c
index 89b4377a..942ba26b 100644
--- a/runner/runner_tests.c
+++ b/runner/runner_tests.c
@@ -514,6 +514,8 @@ igt_main
 	job_list_filter_test("binary-exclude", "-x", "successtest", 3, 2);
 	job_list_filter_test("subtest-include", "-t", "first-subtest", 1, 1);
 	job_list_filter_test("subtest-exclude", "-x", "second-subtest", 4, 3);
+	job_list_filter_test("piglit-names", "-t", "igt@successtest", 2, 1);
+	job_list_filter_test("piglit-names-subtest", "-t", "igt@successtest@first", 1, 1);
 
 	igt_subtest_group {
 		char filename[] = "tmplistXXXXXX";
-- 
2.14.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-08-16 11:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-14 12:38 [igt-dev] [PATCH i-g-t 1/1] runner: Match the piglit name with -t and -x options Petri Latvala
2018-08-14 13:25 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/1] " Patchwork
2018-08-14 16:49 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2018-08-16 11:16 ` [igt-dev] [PATCH i-g-t 1/1] " Arkadiusz Hiler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).