[Piglit] [PATCH 03/15] framework: use statuses instead of relying on string conversions
Dylan Baker
dylan at pnwbakers.com
Tue Jan 23 01:22:04 UTC 2018
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 0b7ebab..2d761ef 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):
"""
--
git-series 0.9.1
More information about the Piglit
mailing list