diff options
author | Michał Górny <mgorny@gentoo.org> | 2011-08-06 15:59:31 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2011-08-06 15:59:31 +0200 |
commit | 1f4aa469ccd35106aedfea309b1951e05aa65251 (patch) | |
tree | 5ebd991e683bda51c8b01f1d8999fefd442a40b2 /pmstestsuite/output | |
parent | Support running tests in undefined-behavior EAPIs. (diff) | |
download | pms-test-suite-1f4aa469ccd35106aedfea309b1951e05aa65251.tar.gz pms-test-suite-1f4aa469ccd35106aedfea309b1951e05aa65251.tar.bz2 pms-test-suite-1f4aa469ccd35106aedfea309b1951e05aa65251.zip |
Clearly distinguish undefined results.
Diffstat (limited to 'pmstestsuite/output')
-rw-r--r-- | pmstestsuite/output/html.py | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/pmstestsuite/output/html.py b/pmstestsuite/output/html.py index 6de16f0..45c7398 100644 --- a/pmstestsuite/output/html.py +++ b/pmstestsuite/output/html.py @@ -45,6 +45,16 @@ class HTMLOutput(OutputModule): .unknown { background: #b8b8b8; } + + .unk-good { + background: #b8b8b8; + color: #008800; + } + + .unk-bad { + background: #b8b8b8; + color: #880000; + } </style> </head> <body> @@ -109,14 +119,21 @@ class HTMLOutput(OutputModule): class ColorValCell(ValCell): def __init__(self, text, a): - self._color_class = 'unknown' if a.undefined \ - else 'good' if a else 'bad' + if a.undefined: + self._color_class = 'unk-good' if a else 'unk-bad' + else: + self._color_class = 'good' if a else 'bad' ValCell.__init__(self, text) class BoolCell(ValCell): - def __init__(self, cond): - self._color_class = 'good' if cond else 'bad' - ValCell.__init__(self, 'OK' if cond else 'FAIL') + def __init__(self, r): + if filter(lambda a: not a.undefined, r.assertions): + self._color_class = 'good' if r else 'bad' + ValCell.__init__(self, 'OK' if r else 'FAIL') + else: # undefined result + self._color_class = 'unk-good' if r else 'unk-bad' + ValCell.__init__(self, 'n/a (but OK)' if r \ + else 'n/a (but FAIL)') class UnknownValCell(ValCell): _color_class = 'unknown' |