summaryrefslogtreecommitdiff
path: root/source4/selftest/output
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-08-27 00:38:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:02:46 -0500
commitbae97f1631d9722294c30eb35552a61b75f25c30 (patch)
tree62b9226db8b24e5788d46f374035702b4646c852 /source4/selftest/output
parent8d6b9f2b883ff54898d1925fcf5e07c5704ba1e7 (diff)
downloadsamba-bae97f1631d9722294c30eb35552a61b75f25c30.tar.gz
samba-bae97f1631d9722294c30eb35552a61b75f25c30.tar.bz2
samba-bae97f1631d9722294c30eb35552a61b75f25c30.zip
r24692: Color expected fialures orange rather than green.
(This used to be commit cadfc0a7a1a86122f9dc5f127c0cd8be89cdaf46)
Diffstat (limited to 'source4/selftest/output')
-rw-r--r--source4/selftest/output/html.pm20
-rw-r--r--source4/selftest/output/testresults.css15
2 files changed, 30 insertions, 5 deletions
diff --git a/source4/selftest/output/html.pm b/source4/selftest/output/html.pm
index 383556903d..a88788fd14 100644
--- a/source4/selftest/output/html.pm
+++ b/source4/selftest/output/html.pm
@@ -128,7 +128,11 @@ sub end_testsuite($$$$$)
my $st = $self->{local_statistics};
if ($ret == $expected_ret) {
- print INDEX " <td class=\"resultOk\">";
+ if ($ret == 0) {
+ print INDEX " <td class=\"resultExpectedFailure\">";
+ } else {
+ print INDEX " <td class=\"resultOk\">";
+ }
} else {
print INDEX " <td class=\"resultFailure\">";
}
@@ -196,7 +200,11 @@ sub end_test($$$$$$)
$track_class = "unexpected_$result";
}
} else {
- print TEST "<td class=\"outputOk\">\n";
+ if ($result eq "failure") {
+ print TEST "<td class=\"outputExpectedFailure\">\n";
+ } else {
+ print TEST "<td class=\"outputOk\">\n";
+ }
$track_class = "expected_$result";
}
@@ -238,9 +246,11 @@ sub summary($)
if ($st->{TESTS_SKIP} > 0) {
print INDEX ", $st->{TESTS_SKIP} skipped";
}
- print INDEX ", " . ($st->{TESTS_UNEXPECTED_FAIL} + $st->{TESTS_EXPECTED_FAIL}) . " failures";
- if ($st->{TESTS_UNEXPECTED_OK} > 0) {
- print INDEX " ($st->{TESTS_EXPECTED_FAIL} expected)";
+ if (($st->{TESTS_UNEXPECTED_FAIL} + $st->{TESTS_EXPECTED_FAIL}) > 0) {
+ print INDEX ", " . ($st->{TESTS_UNEXPECTED_FAIL} + $st->{TESTS_EXPECTED_FAIL}) . " failures";
+ if ($st->{TESTS_UNEXPECTED_FAIL} > 0) {
+ print INDEX " ($st->{TESTS_EXPECTED_FAIL} expected)";
+ }
}
if ($st->{TESTS_ERROR} > 0) {
print INDEX ", $st->{TESTS_ERROR} errors";
diff --git a/source4/selftest/output/testresults.css b/source4/selftest/output/testresults.css
index 9f3b6c9e82..56c4b0ead4 100644
--- a/source4/selftest/output/testresults.css
+++ b/source4/selftest/output/testresults.css
@@ -56,6 +56,16 @@ td.resultFailure
font-weight: bold;
}
+/* Expected failure */
+td.resultExpectedFailure
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #FFA500;
+ font-weight: bold;
+}
+
/* Skipped */
td.resultSkipped
{
@@ -91,6 +101,11 @@ td.outputFailure
background-color: #FF0000;
}
+td.outputExpectedFailure
+{
+ background-color: #FFA500;
+}
+
div.reason
{
text-align: center;