All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Wood <thomas.wood@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t] lib: allow wildcard matching when specifying subtests
Date: Wed, 16 Sep 2015 15:26:24 +0100	[thread overview]
Message-ID: <1442413584-4845-1-git-send-email-thomas.wood@intel.com> (raw)

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>
---
 lib/igt_core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/igt_core.c b/lib/igt_core.c
index 129476c..59127ca 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;
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

                 reply	other threads:[~2015-09-16 14:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1442413584-4845-1-git-send-email-thomas.wood@intel.com \
    --to=thomas.wood@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.