First, this replaces str.find() with 'if x in str', this is simpler and
easier to read, and unlike find(), short-circuits on the first True.
Second, it removes the check for skip. This isn't needed since if the
test is skipped it will return before reaching the interpret_result()
call, making this dead code.

v2: - split this change out of the next patch

Signed-off-by: Dylan Baker <[email protected]>
---
 framework/gleantest.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/framework/gleantest.py b/framework/gleantest.py
index 2f22c87..5229cf5 100644
--- a/framework/gleantest.py
+++ b/framework/gleantest.py
@@ -40,10 +40,7 @@ class GleanTest(Test):
         return super(GleanTest, self).command + self.globalParams
 
     def interpret_result(self):
-        if "{'result': 'skip'}" in self.result['out']:
-            self.result['result'] = 'skip'
-        elif (self.result['out'].find('FAIL') >= 0 or
-                self.result['returncode'] != 0):
+        if self.result['returncode'] != 0 or 'FAIL' in self.result['out']:
             self.result['result'] = 'fail'
         else:
             self.result['result'] = 'pass'
-- 
2.0.0.rc2

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to