summaryrefslogtreecommitdiff
path: root/source4/selftest/output/plain.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-20 15:54:02 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 06:28:47 +0100
commit254f1c6fee18dd14d2f9f97d65e6fe9ef04c26f2 (patch)
tree2c298314e59ed3db7e3dbecb6c66e465800e9afb /source4/selftest/output/plain.pm
parent9ca5a267466f7b1b83a906b1f3b8b1b953222f21 (diff)
downloadsamba-254f1c6fee18dd14d2f9f97d65e6fe9ef04c26f2.tar.gz
samba-254f1c6fee18dd14d2f9f97d65e6fe9ef04c26f2.tar.bz2
samba-254f1c6fee18dd14d2f9f97d65e6fe9ef04c26f2.zip
r26547: Make testsuites less special during subunit handling.
(This used to be commit 0bf6bdcd7f21740853ae852193d51bdf14201782)
Diffstat (limited to 'source4/selftest/output/plain.pm')
-rw-r--r--source4/selftest/output/plain.pm36
1 files changed, 22 insertions, 14 deletions
diff --git a/source4/selftest/output/plain.pm b/source4/selftest/output/plain.pm
index 8a56d1c922..a11ada871a 100644
--- a/source4/selftest/output/plain.pm
+++ b/source4/selftest/output/plain.pm
@@ -25,18 +25,18 @@ sub output_msg($$$);
sub start_testsuite($$$)
{
my ($self, $name, $state) = @_;
- my $out = "";
my $duration = $state->{START_TIME} - $self->{statistics}->{START_TIME};
- $out .= "[$state->{INDEX}/$state->{TOTAL} in ".$duration."s";
- $out .= sprintf(", %d errors", $self->{statistics}->{SUITES_FAIL}) if ($self->{statistics}->{SUITES_FAIL} > 0);
- $out .= "] $name\n",
$self->{test_output}->{$name} = "" unless($self->{verbose});
$self->output_msg($state, "CMD: $state->{CMD}\n");
- print $out;
+ my $out = "";
+ $out .= "[$state->{INDEX}/$state->{TOTAL} in ".$duration."s";
+ $out .= sprintf(", %d errors", $self->{statistics}->{SUITES_FAIL}) if ($self->{statistics}->{SUITES_FAIL} > 0);
+ $out .= "] $name\n",
+ print "$out";
}
sub output_msg($$$)
@@ -59,16 +59,14 @@ sub control_msg($$$)
sub end_testsuite($$$$$$)
{
- my ($self, $name, $state, $expected_ret, $ret, $envlog) = @_;
+ my ($self, $name, $state, $result, $unexpected, $reason) = @_;
my $out = "";
- $self->output_msg($state, "ENVLOG: $envlog\n") if ($envlog ne "");
-
- if ($ret != $expected_ret) {
- $self->output_msg($state, "ERROR: $ret\n");
+ if ($unexpected) {
+ $self->output_msg($state, "ERROR: $reason\n");
}
- if ($ret != $expected_ret and $self->{immediate} and not $self->{verbose}) {
+ if ($unexpected and $self->{immediate} and not $self->{verbose}) {
$out .= $self->{test_output}->{$name};
push (@{$self->{suitesfailed}}, $name);
}
@@ -76,14 +74,24 @@ sub end_testsuite($$$$$$)
print $out;
}
-sub start_test($$)
+sub start_test($$$$)
{
- my ($state, $testname) = @_;
+ my ($self, $state, $parents, $testname) = @_;
+
+ if ($#$parents == -1) {
+ $self->start_testsuite($testname, $state);
+ }
}
sub end_test($$$$$$)
{
- my ($self, $state, $testname, $result, $unexpected, $reason) = @_;
+ my ($self, $state, $parents, $testname, $result, $unexpected, $reason) = @_;
+
+ if ($#$parents == -1) {
+ $self->end_testsuite($testname, $state, $result, $unexpected, $reason);
+ return;
+ }
+
my $append = "";
unless ($unexpected) {