[Intel-gfx] [PATCH i-g-t] lib/igt_core.c: Add partial match functionality to run-subtests

Derek Morton derek.j.morton at intel.com
Fri Feb 19 10:31:31 UTC 2016


Add the ability to specify a substring of the subtest using --run-subtests.

This allows 'string' to be used as an abbreviation of the wildcard expression
'*string*' when defining which subtests should run.

Signed-off-by: Derek Morton <derek.j.morton at intel.com>
---
 lib/igt_core.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/igt_core.c b/lib/igt_core.c
index 8e0bd2e..1e31a25 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -215,7 +215,7 @@
  * description of allowed wildcard expressions.
  * Some examples of allowed wildcard expressions are:
  *
- * - '*basic*' match any subtest containing basic
+ * - '*basic*' match any subtest containing basic. This expression may be abbreviated to just 'basic'.
  * - 'basic-???' match any subtest named basic- with 3 characters after -
  * - 'basic-[0-9]' match any subtest named basic- with a single number after -
  * - 'basic-[^0-9]' match any subtest named basic- with a single non numerical character after -
@@ -827,7 +827,8 @@ bool __igt_run_subtest(const char *subtest_name)
 	}
 
 	if (run_single_subtest) {
-		if (uwildmat(subtest_name, run_single_subtest) == 0)
+		if ((uwildmat(subtest_name, run_single_subtest) == 0) &&
+		    (NULL == strstr(subtest_name, run_single_subtest)))
 			return false;
 		else
 			run_single_subtest_found = true;
-- 
1.9.1



More information about the Intel-gfx mailing list