summaryrefslogtreecommitdiff
path: root/selftest/output
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-06-05 16:32:52 +0200
committerJelmer Vernooij <jelmer@samba.org>2009-06-11 19:59:59 +0200
commited61cc5419651437ae0b8eb7d3dd9c56c7627388 (patch)
tree2d7d98fc17fd681ebe3a62628ecf2c40c4fc57c0 /selftest/output
parent68578d6374236e0606b21f5168956c3a515b7b0c (diff)
downloadsamba-ed61cc5419651437ae0b8eb7d3dd9c56c7627388.tar.gz
samba-ed61cc5419651437ae0b8eb7d3dd9c56c7627388.tar.bz2
samba-ed61cc5419651437ae0b8eb7d3dd9c56c7627388.zip
selftest: Fix subunit formatting, fix years when filtering subunit
streams.
Diffstat (limited to 'selftest/output')
-rw-r--r--selftest/output/buildfarm.pm4
-rw-r--r--selftest/output/html.pm31
-rw-r--r--selftest/output/subunit.pm2
3 files changed, 22 insertions, 15 deletions
diff --git a/selftest/output/buildfarm.pm b/selftest/output/buildfarm.pm
index b2edca4b94..95c5423383 100644
--- a/selftest/output/buildfarm.pm
+++ b/selftest/output/buildfarm.pm
@@ -38,6 +38,10 @@ sub new($$$) {
bless($self, $class);
}
+sub testsuite_count($$)
+{
+}
+
sub report_time($$)
{
my ($self, $time) = @_;
diff --git a/selftest/output/html.pm b/selftest/output/html.pm
index 5b7a2301b5..8e42b65649 100644
--- a/selftest/output/html.pm
+++ b/selftest/output/html.pm
@@ -61,6 +61,10 @@ sub new($$$) {
return $self;
}
+sub testsuite_count($$)
+{
+}
+
sub print_html_header($$$)
{
my ($self, $title, $fh) = @_;
@@ -118,6 +122,7 @@ sub control_msg($$)
{
my ($self, $output) = @_;
+ # Perhaps the CSS should hide this by default?
$self->{msg} .= "<span class=\"control\">$output<br/></span>\n";
}
@@ -126,15 +131,17 @@ sub output_msg($$)
my ($self, $output) = @_;
unless (defined($self->{active_test})) {
- print TEST "$output<br/>";
+ if (defined($self->{NAME})) {
+ print TEST "$output<br/>";
+ }
} else {
$self->{msg} .= "$output<br/>";
}
}
-sub end_testsuite($$$$)
+sub end_testsuite($$$)
{
- my ($self, $name, $result, $unexpected, $reason) = @_;
+ my ($self, $name, $result, $reason) = @_;
print TEST "</table>\n";
@@ -148,12 +155,10 @@ sub end_testsuite($$$$)
print INDEX " <td class=\"testSuite\"><a href=\"$self->{HTMLFILE}\">$name</a></td>\n";
my $st = $self->{local_statistics};
- if (not $unexpected) {
- if ($result eq "failure") {
- print INDEX " <td class=\"resultExpectedFailure\">";
- } else {
- print INDEX " <td class=\"resultOk\">";
- }
+ if ($result eq "xfail") {
+ print INDEX " <td class=\"resultExpectedFailure\">";
+ } elsif ($result eq "success") {
+ print INDEX " <td class=\"resultOk\">";
} else {
print INDEX " <td class=\"resultFailure\">";
}
@@ -180,16 +185,14 @@ sub end_testsuite($$$$)
}
if ($l == 0) {
- if (not $unexpected) {
- print INDEX "OK";
- } else {
- print INDEX "FAIL";
- }
+ print INDEX uc($result);
}
print INDEX "</td>";
print INDEX "</tr>\n";
+
+ $self->{NAME} = undef;
}
sub report_time($$)
diff --git a/selftest/output/subunit.pm b/selftest/output/subunit.pm
index 6c032e6820..b543b68750 100644
--- a/selftest/output/subunit.pm
+++ b/selftest/output/subunit.pm
@@ -66,7 +66,7 @@ sub end_testsuite($$$$$$)
if ($result eq "failure" and not $unexpected) { $result = "xfail"; }
- Subunit::end_test($name, $result, $reason);
+ Subunit::end_testsuite($name, $result, $reason);
}
sub start_test($$)