[Piglit] [Patch v2 03/13] gleantest.py: simplify interpret_result()
Dylan Baker
baker.dylan.c at gmail.com
Tue May 13 11:38:36 PDT 2014
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 <baker.dylan.c at gmail.com>
---
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
More information about the Piglit
mailing list