[Piglit] [PATCH 1/2] framework: add incomplete status.

Dylan Baker baker.dylan.c at gmail.com
Wed Apr 15 17:07:29 PDT 2015


This will be used later in this series

This status has a background color of purple in the html summary, and is
considered the worst status.

My logic for making it the worst status is as follows: basically we
always want this to show up as a regression, because it's a very unusual
status (only available when piglit is aborted or when the whole system
goes down).

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 framework/status.py             | 27 +++++++++++++++++----------
 framework/tests/status_tests.py |  2 +-
 templates/index.css             |  5 ++++-
 3 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/framework/status.py b/framework/status.py
index 9af2ce6..90f69fb 100644
--- a/framework/status.py
+++ b/framework/status.py
@@ -66,6 +66,7 @@ __all__ = ['NOTRUN',
            'DMESG_FAIL',
            'SKIP',
            'TIMEOUT',
+           'INCOMPLETE',
            'ALL']
 
 
@@ -77,15 +78,18 @@ def status_lookup(status):
     does not correspond to a key it will raise an exception
 
     """
-    status_dict = {'skip': SKIP,
-                   'pass': PASS,
-                   'warn': WARN,
-                   'fail': FAIL,
-                   'crash': CRASH,
-                   'dmesg-warn': DMESG_WARN,
-                   'dmesg-fail': DMESG_FAIL,
-                   'notrun': NOTRUN,
-                   'timeout': TIMEOUT}
+    status_dict = {
+        'skip': SKIP,
+        'pass': PASS,
+        'warn': WARN,
+        'fail': FAIL,
+        'crash': CRASH,
+        'dmesg-warn': DMESG_WARN,
+        'dmesg-fail': DMESG_FAIL,
+        'notrun': NOTRUN,
+        'timeout': TIMEOUT,
+        'incomplete': INCOMPLETE,
+    }
 
     try:
         return status_dict[status]
@@ -231,5 +235,8 @@ TIMEOUT = Status('timeout', 50)
 
 CRASH = Status('crash', 60)
 
+INCOMPLETE = Status('incomplete', 100)
+
 # A tuple (ordered, immutable) of all statuses in this module
-ALL = (PASS, WARN, DMESG_WARN, FAIL, DMESG_FAIL, TIMEOUT, CRASH, SKIP, NOTRUN)
+ALL = (PASS, WARN, DMESG_WARN, FAIL, DMESG_FAIL, TIMEOUT, CRASH, INCOMPLETE,
+       SKIP, NOTRUN)
diff --git a/framework/tests/status_tests.py b/framework/tests/status_tests.py
index 52ad134..05942eb 100644
--- a/framework/tests/status_tests.py
+++ b/framework/tests/status_tests.py
@@ -36,7 +36,7 @@ import framework.tests.utils as utils
 # Statuses from worst to last. NotRun is intentionally not in this list and
 # tested separately because of upcoming features for it
 STATUSES = ["pass", "warn", "dmesg-warn", "fail", "dmesg-fail", "timeout",
-            "crash"]
+            "crash", 'incomplete']
 
 # all statuses except pass are problems
 PROBLEMS = STATUSES[1:]
diff --git a/templates/index.css b/templates/index.css
index 3389738..f037eb1 100644
--- a/templates/index.css
+++ b/templates/index.css
@@ -36,7 +36,7 @@ td:first-child > div {
 	background-color: #c8c838
 }
 
-td.skip, td.warn, td.fail, td.pass, td.trap, td.abort, td.crash, td.dmesg-warn, td.dmesg-fail, td.timeout {
+td.skip, td.warn, td.fail, td.pass, td.trap, td.abort, td.crash, td.dmesg-warn, td.dmesg-fail, td.timeout, td.incomplete {
 	text-align: right;
 }
 
@@ -76,3 +76,6 @@ tr:nth-child(odd)  td.abort { background-color: #111111; }
 tr:nth-child(even) td.abort { background-color: #000000; }
 tr:nth-child(odd)  td.crash { background-color: #111111; }
 tr:nth-child(even) td.crash { background-color: #000000; }
+
+tr:nth-child(odd)  td.incomplete { background-color: #853385; }
+tr:nth-child(even) td.incomplete { background-color: #351435; }
-- 
2.3.5



More information about the Piglit mailing list