summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-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;