From 6e196707c1363391d0d38be14e532272612439e0 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 21 Mar 2019 14:44:49 +0200 Subject: runner/job_list: print error when job list is empty Using a filter that doesn't match any test name resulted in the runner silently failing. Print an error message so that the user understands why the runner fails. Signed-off-by: Simon Ser Reviewed-by: Petri Latvala --- runner/job_list.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/runner/job_list.c b/runner/job_list.c index 97bbb0be..941e2ee0 100644 --- a/runner/job_list.c +++ b/runner/job_list.c @@ -133,6 +133,7 @@ static bool filtered_job_list(struct job_list *job_list, { FILE *f; char buf[128]; + bool ok; if (job_list->entries != NULL) { fprintf(stderr, "Caller didn't clear the job list, this shouldn't happen\n"); @@ -179,7 +180,11 @@ static bool filtered_job_list(struct job_list *job_list, &settings->exclude_regexes); } - return job_list->size != 0; + ok = job_list->size != 0; + if (!ok) + fprintf(stderr, "Filter didn't match any job name\n"); + + return ok; } static bool job_list_from_test_list(struct job_list *job_list, -- cgit v1.2.3