From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QphoL-0005WG-NX for garchives@archives.gentoo.org; Sat, 06 Aug 2011 14:25:10 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C7DBD21C188; Sat, 6 Aug 2011 14:25:02 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 97B2221C188 for ; Sat, 6 Aug 2011 14:25:02 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 104F81B403F for ; Sat, 6 Aug 2011 14:25:02 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 67D8B8004B for ; Sat, 6 Aug 2011 14:25:00 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1f4aa469ccd35106aedfea309b1951e05aa65251.mgorny@gentoo> Subject: [gentoo-commits] proj/pms-test-suite:master commit in: pmstestsuite/output/ X-VCS-Repository: proj/pms-test-suite X-VCS-Files: pmstestsuite/output/html.py X-VCS-Directories: pmstestsuite/output/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 1f4aa469ccd35106aedfea309b1951e05aa65251 Date: Sat, 6 Aug 2011 14:25:00 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 35cff64ccec4e30532be04be779a6150 commit: 1f4aa469ccd35106aedfea309b1951e05aa65251 Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Sat Aug 6 13:59:31 2011 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Sat Aug 6 13:59:31 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/pms-test-suit= e.git;a=3Dcommit;h=3D1f4aa469 Clearly distinguish undefined results. --- 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; + } @@ -109,14 +119,21 @@ class HTMLOutput(OutputModule): =20 class ColorValCell(ValCell): def __init__(self, text, a): - self._color_class =3D 'unknown' if a.undefined \ - else 'good' if a else 'bad' + if a.undefined: + self._color_class =3D 'unk-good' if a else 'unk-bad' + else: + self._color_class =3D 'good' if a else 'bad' ValCell.__init__(self, text) =20 class BoolCell(ValCell): - def __init__(self, cond): - self._color_class =3D '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 =3D 'good' if r else 'bad' + ValCell.__init__(self, 'OK' if r else 'FAIL') + else: # undefined result + self._color_class =3D 'unk-good' if r else 'unk-bad' + ValCell.__init__(self, 'n/a (but OK)' if r \ + else 'n/a (but FAIL)') =20 class UnknownValCell(ValCell): _color_class =3D 'unknown'