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

baker.dylan.c at gmail.com baker.dylan.c at gmail.com
Wed Oct 21 11:06:29 PDT 2015


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



More information about the Piglit mailing list