From 982934625ac67234c6d85c6cf29a5a487e54d4f0 Mon Sep 17 00:00:00 2001 From: Thomas Wood Date: Wed, 16 Sep 2015 14:36:24 +0100 Subject: lib: allow wildcard matching when specifying subtests This allows multiple subtests to be specified using standard wildcard characters when using the --run-subtest command line option. Signed-off-by: Thomas Wood --- lib/igt_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/igt_core.c') diff --git a/lib/igt_core.c b/lib/igt_core.c index 129476c9..59127caf 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -56,6 +56,7 @@ #include #include #include +#include #include "drmtest.h" #include "intel_chipset.h" @@ -771,7 +772,7 @@ bool __igt_run_subtest(const char *subtest_name) } if (run_single_subtest) { - if (strcmp(subtest_name, run_single_subtest) != 0) + if (fnmatch(run_single_subtest, subtest_name, 0) != 0) return false; else run_single_subtest_found = true; -- cgit v1.2.3