summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Wood <thomas.wood@intel.com>2015-09-16 14:36:24 +0100
committerThomas Wood <thomas.wood@intel.com>2015-09-17 12:41:35 +0100
commit982934625ac67234c6d85c6cf29a5a487e54d4f0 (patch)
treed1a492c4cab79b2fa6f80efa6d6ed577b4af9172
parentb883b3066848957376d841cb4ffdf2d5646315c8 (diff)
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 <thomas.wood@intel.com>
-rw-r--r--lib/igt_core.c3
1 files changed, 2 insertions, 1 deletions
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 <ctype.h>
#include <limits.h>
#include <locale.h>
+#include <fnmatch.h>
#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;