[Piglit] [Patch v2 13/13] exectest.py: remove try/except from PiglitTest.interpret_result

Dylan Baker baker.dylan.c at gmail.com
Wed Apr 16 20:06:21 PDT 2014


This removes a try/except that would catch everything and return a
'fail' status and a possible related error message. Instead, just let
the method except and allow it to get caught and logged as a python
exception.

Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
---
 framework/exectest.py | 22 +++++++++-------------
 1 file changed, 9 insertions(+), 13 deletions(-)

diff --git a/framework/exectest.py b/framework/exectest.py
index 43c9a99..4410115 100644
--- a/framework/exectest.py
+++ b/framework/exectest.py
@@ -273,16 +273,12 @@ class PiglitTest(Test):
         outlines = self.result['out'].split('\n')
         outpiglit = (s[7:] for s in outlines if s.startswith('PIGLIT:'))
 
-        try:
-            for piglit in outpiglit:
-                if piglit.startswith('subtest'):
-                    if not 'subtest' in self.result:
-                        self.result['subtest'] = {}
-                    self.result['subtest'].update(eval(piglit[7:]))
-                else:
-                    self.result.update(eval(piglit))
-            self.result['out'] = '\n'.join(
-                s for s in outlines if not s.startswith('PIGLIT:'))
-        except:
-            self.result['result'] = 'fail'
-            self.result['note'] = 'Failed to parse result string'
+        for piglit in outpiglit:
+            if piglit.startswith('subtest'):
+                if not 'subtest' in self.result:
+                    self.result['subtest'] = {}
+                self.result['subtest'].update(eval(piglit[7:]))
+            else:
+                self.result.update(eval(piglit))
+        self.result['out'] = '\n'.join(
+            s for s in outlines if not s.startswith('PIGLIT:'))
-- 
1.9.2



More information about the Piglit mailing list