[Piglit] [PATCH 1/3] framework/status: Add a new exception for framework exceptions

Dylan Baker dylan at pnwbakers.com
Sat Oct 1 00:43:53 UTC 2016


This status is meant to be used only for exception in the python
framework, so they don't mask actual test failures and because they are
*always* problems that need to be solved quickly.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 framework/status.py                | 5 ++++-
 unittests/framework/test_status.py | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/framework/status.py b/framework/status.py
index c69c50a..f51b81e 100644
--- a/framework/status.py
+++ b/framework/status.py
@@ -255,6 +255,8 @@ CRASH = Status('crash', 60)
 
 INCOMPLETE = Status('incomplete', 100)
 
+EXCEPTION = Status('exception', 1000)
+
 _STATUS_MAP = {
     'skip': SKIP,
     'pass': PASS,
@@ -266,8 +268,9 @@ _STATUS_MAP = {
     'notrun': NOTRUN,
     'timeout': TIMEOUT,
     'incomplete': INCOMPLETE,
+    'exception': EXCEPTION,
 }
 
 # A tuple (ordered, immutable) of all statuses in this module
 ALL = (PASS, WARN, DMESG_WARN, FAIL, DMESG_FAIL, TIMEOUT, CRASH, INCOMPLETE,
-       SKIP, NOTRUN)
+       EXCEPTION, SKIP, NOTRUN)
diff --git a/unittests/framework/test_status.py b/unittests/framework/test_status.py
index 94f805a..3bcc098 100644
--- a/unittests/framework/test_status.py
+++ b/unittests/framework/test_status.py
@@ -49,6 +49,7 @@ STATUSES = [
     status.TIMEOUT,
     status.CRASH,
     status.INCOMPLETE,
+    status.EXCEPTION,
 ]
 
 # all statuses except pass are problems
-- 
2.10.0



More information about the Piglit mailing list