summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-02-06 10:41:42 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-02-11 15:22:36 +1000
commit7cac8a24c3ba0bb6d444f99a7b29358399062d2f (patch)
tree2f5435bec30064413ff866a244282eb18dd8c82f
parentb3ab7e6586132ab99872b761ee2f44b2b1816bc7 (diff)
registry: handle non-existing results when comparing
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--registry/xit.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/registry/xit.py b/registry/xit.py
index c96ec90..77b2a2a 100644
--- a/registry/xit.py
+++ b/registry/xit.py
@@ -598,7 +598,10 @@ class XITTestRegistryCLI:
color = termcolors.DEFAULT
- if test != None:
+ if test != None and result != None:
+ suite = test.suite
+ name = test.name
+ status = str(result.status).lower()
expected_status = str(test.status).lower()
if str(test.status).lower() != str(result.status).lower():
status_match = "XX"
@@ -608,12 +611,22 @@ class XITTestRegistryCLI:
color = termcolors.RED
else:
status_match = "++" if test.status else "--"
+ elif test != None and result == None:
+ suite = test.suite
+ name = test.name
+ status_match = "??"
+ expected_status = str(test.status).lower()
+ status = ""
+ color = termcolors.BLUE
else:
+ suite = result.suite
+ name = result.name
+ status = str(result.status).lower()
expected_status = ""
status_match = "??"
color = termcolors.BLUE
- print color + format_str.format(status_match, result.suite, result.name, str(result.status).lower(), expected_status) + termcolors.DEFAULT
+ print color + format_str.format(status_match, suite, name, status, expected_status) + termcolors.DEFAULT
def check_installed_rpms(self, registry):