[Piglit] [PATCH 4/9] tests/oglconform.py: replace re with 'str in str'

Vinson Lee vlee at freedesktop.org
Fri Oct 23 01:18:35 PDT 2015


On Wed, Oct 21, 2015 at 11:06 AM,  <baker.dylan.c at gmail.com> wrote:
> From: Dylan Baker <baker.dylan.c at gmail.com>
>
> This is a simpler solution. In some cases this may be more expensive
> than the re, but in others it will be cheaper. Even if keeping the re it
> should be compiled for performance reasons.
>
> Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
> ---
>  tests/oglconform.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/oglconform.py b/tests/oglconform.py
> index a34d433..a20dfb3 100644
> --- a/tests/oglconform.py
> +++ b/tests/oglconform.py
> @@ -57,7 +57,7 @@ class OGLCTest(Test):
>      def interpret_result(self):
>          if self.skip_re.search(self.result.out) is not None:
>              self.result.result = 'skip'
> -        elif re.search('Total Passed : 1', self.result.out) is not None:
> +        elif 'Total Passed : 1' in self.result.out:
>              self.result.result = 'pass'
>          else:
>              self.result.result = 'fail'
> --
> 2.6.1
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit

Reviewed-by: Vinson Lee <vlee at freedesktop.org>


More information about the Piglit mailing list