[Piglit] [PATCH] framework/profile: Use re.IGNORECASE for RegexFilter

Dylan Baker dylan at pnwbakers.com
Wed Nov 16 19:51:13 UTC 2016

This flag makes the regular expressions match case-insensitive, and is
useful since piglit treats test names as case insensitive (lowering them
all by default). This was inadvertently changed to not use the flag in
e92555a647, which replaced the part that added this flag with a simpler
implementation, so this patch reverts to the previous behavior.

cc: Alejandro PiƱeiro <apinheiro at igalia.com>
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
 framework/profile.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/framework/profile.py b/framework/profile.py
index 78b3a2d..94efd0a 100644
--- a/framework/profile.py
+++ b/framework/profile.py
@@ -75,7 +75,7 @@ class RegexFilter(object):
     def __init__(self, filters, inverse=False):
-        self.filters = [re.compile(f) for f in filters]
+        self.filters = [re.compile(f, flags=re.IGNORECASE) for f in filters]
         self.inverse = inverse
     def __call__(self, name, _):  # pylint: disable=invalid-name

More information about the Piglit mailing list