[Piglit] [PATCH] framework/profile: Use re.IGNORECASE for RegexFilter
Alejandro Piñeiro
apinheiro at igalia.com
Mon Nov 21 11:24:00 UTC 2016
On 16/11/16 20:51, Dylan Baker wrote:
> 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
Looks good. Just made a quick test and works fine to me. Thanks for
fixing it.
Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>
More information about the Piglit
mailing list