[Piglit] [PATCH 04/16] framework: use statuses instead of relying on string conversions

Fabian Bieler fabianbieler at fastmail.fm
Mon Jan 29 00:22:14 UTC 2018


From: Dylan Baker <dylan at pnwbakers.com>

This is a small cleanup, but we need to touch this code further for
subtest enumeration work, and we'll want to use statuses there too.
---
 framework/test/base.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/framework/test/base.py b/framework/test/base.py
index 0b7ebab2e..2d761efa9 100644
--- a/framework/test/base.py
+++ b/framework/test/base.py
@@ -235,12 +235,12 @@ class Test(object):
         """Convert the raw output of the test into a form piglit understands.
         """
         if is_crash_returncode(self.result.returncode):
-            self.result.result = 'crash'
+            self.result.result = status.CRASH
         elif self.result.returncode != 0:
-            if self.result.result == 'pass':
-                self.result.result = 'warn'
+            if self.result.result == status.PASS:
+                self.result.result = status.WARN
             else:
-                self.result.result = 'fail'
+                self.result.result = status.FAIL
 
     def run(self):
         """
-- 
2.15.1



More information about the Piglit mailing list