diff options
author | Lyude Paul <lyude@redhat.com> | 2019-05-09 13:06:41 -0400 |
---|---|---|
committer | Lyude Paul <lyude@redhat.com> | 2019-05-10 12:16:59 -0400 |
commit | 709bd6869e2aff01a67eef729f9dc330f404387e (patch) | |
tree | a759f1115d02e96070d24cd12953110ae675ae11 /runner/job_list.c | |
parent | 159c69e5318e934b5f1d83939191c8756280b758 (diff) |
runner: Use glib's regex utilities instead of POSIX ERE
POSIX ERE, while pretty standard is also very old and severely limited.
In fact, it's so limited that Intel CI's own test blacklist,
tests/intel-ci/blacklist.txt, doesn't even work with it due to the lack
of support for backreferences.
Since we're already using glib in other parts of igt, let's just start
using glib's regular expression matching instead of the POSIX regex API.
This gives us full perl compatible regular expressions and in turn, also
gives us python compatible regular expressions to match piglit.
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'runner/job_list.c')
-rw-r--r-- | runner/job_list.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/runner/job_list.c b/runner/job_list.c index 941e2ee0..4a16742f 100644 --- a/runner/job_list.c +++ b/runner/job_list.c @@ -17,10 +17,8 @@ static bool matches_any(const char *str, struct regex_list *list) size_t i; for (i = 0; i < list->size; i++) { - if (regexec(list->regexes[i], str, - (size_t)0, NULL, 0) == 0) { + if (g_regex_match(list->regexes[i], str, 0, NULL)) return true; - } } return false; |