summaryrefslogtreecommitdiff
path: root/source4/selftest/output
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-10-26 21:25:43 +0200
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:43:39 +0100
commit9d4addadc089b52867c98d714894192e832a27d2 (patch)
treecf1ada317b35402de51d74df570fde5d61b2d6ae /source4/selftest/output
parente690c56ab7180f135ba0e67a24f53282c3f0d144 (diff)
downloadsamba-9d4addadc089b52867c98d714894192e832a27d2.tar.gz
samba-9d4addadc089b52867c98d714894192e832a27d2.tar.bz2
samba-9d4addadc089b52867c98d714894192e832a27d2.zip
r25742: Start trimming down hash size for start_testsuite.
(This used to be commit f2319fbe9be76966c81f3d4279f6bc2a631a3a5a)
Diffstat (limited to 'source4/selftest/output')
-rw-r--r--source4/selftest/output/buildfarm.pm20
-rw-r--r--source4/selftest/output/html.pm13
-rw-r--r--source4/selftest/output/plain.pm14
3 files changed, 23 insertions, 24 deletions
diff --git a/source4/selftest/output/buildfarm.pm b/source4/selftest/output/buildfarm.pm
index b5971e47ad..f3ad9319b4 100644
--- a/source4/selftest/output/buildfarm.pm
+++ b/source4/selftest/output/buildfarm.pm
@@ -16,21 +16,21 @@ sub new($$$$) {
bless($self, $class);
}
-sub start_testsuite($$)
+sub start_testsuite($$$)
{
- my ($self, $state) = @_;
+ my ($self, $name, $state) = @_;
my $out = "";
my $duration = $state->{START_TIME} - $self->{statistics}->{START_TIME};
$out .= "--==--==--==--==--==--==--==--==--==--==--\n";
- $out .= "Running test $state->{NAME} (level 0 stdout)\n";
+ $out .= "Running test $name (level 0 stdout)\n";
$out .= "--==--==--==--==--==--==--==--==--==--==--\n";
$out .= scalar(localtime())."\n";
$out .= "SELFTEST RUNTIME: " . $duration . "s\n";
- $out .= "NAME: $state->{NAME}\n";
+ $out .= "NAME: $name\n";
$out .= "CMD: $state->{CMD}\n";
- $self->{test_output}->{$state->{NAME}} = "";
+ $self->{test_output}->{$name} = "";
print $out;
}
@@ -49,9 +49,9 @@ sub control_msg($$$)
$self->{test_output}->{$state->{NAME}} .= $output;
}
-sub end_testsuite($$$$$)
+sub end_testsuite($$$$$$)
{
- my ($self, $state, $expected_ret, $ret, $envlog) = @_;
+ my ($self, $name, $state, $expected_ret, $ret, $envlog) = @_;
my $out = "";
$out .= "TEST RUNTIME: " . (time() - $state->{START_TIME}) . "s\n";
@@ -60,7 +60,7 @@ sub end_testsuite($$$$$)
$out .= "ALL OK\n";
} else {
$out .= "ERROR: $ret\n";
- $out .= $self->{test_output}->{$state->{NAME}};
+ $out .= $self->{test_output}->{$name};
}
$out .= "PCAP FILE: $state->{PCAP_FILE}\n" if defined($state->{PCAP_FILE});
@@ -69,9 +69,9 @@ sub end_testsuite($$$$$)
$out .= "==========================================\n";
if ($ret == $expected_ret) {
- $out .= "TEST PASSED: $state->{NAME}\n";
+ $out .= "TEST PASSED: $name\n";
} else {
- $out .= "TEST FAILED: $state->{NAME} (status $ret)\n";
+ $out .= "TEST FAILED: $name (status $ret)\n";
}
$out .= "==========================================\n";
diff --git a/source4/selftest/output/html.pm b/source4/selftest/output/html.pm
index b8ee60edf7..9e83821bc1 100644
--- a/source4/selftest/output/html.pm
+++ b/source4/selftest/output/html.pm
@@ -73,9 +73,9 @@ sub print_html_footer($$)
sub output_msg($$$);
-sub start_testsuite($$)
+sub start_testsuite($$$)
{
- my ($self, $state) = @_;
+ my ($self, $name, $state) = @_;
$self->{local_statistics} = {
success => 0,
@@ -84,13 +84,12 @@ sub start_testsuite($$)
failure => 0
};
- $state->{HTMLFILE} = "$state->{NAME}.html";
+ $state->{HTMLFILE} = "$name.html";
$state->{HTMLFILE} =~ s/[:\t\n \/]/_/g;
open(TEST, ">$self->{dirname}/$state->{HTMLFILE}") or die("Unable to open $state->{HTMLFILE} for writing");
- $self->print_html_header("Test Results for $state->{NAME}",
- *TEST);
+ $self->print_html_header("Test Results for $name", *TEST);
if ($state->{ENVNAME} ne "none") {
print TEST "<h2>Environment settings</h2>\n";
@@ -137,7 +136,7 @@ sub output_msg($$$)
sub end_testsuite($$$$$)
{
- my ($self, $state, $expected_ret, $ret, $envlog) = @_;
+ my ($self, $name, $state, $expected_ret, $ret, $envlog) = @_;
print TEST "</table>\n";
@@ -149,7 +148,7 @@ sub end_testsuite($$$$$)
close(TEST);
print INDEX "<tr>\n";
- print INDEX " <td class=\"testSuite\"><a href=\"$state->{HTMLFILE}\">$state->{NAME}</a></td>\n";
+ print INDEX " <td class=\"testSuite\"><a href=\"$state->{HTMLFILE}\">$name</a></td>\n";
my $st = $self->{local_statistics};
if ($ret == $expected_ret) {
diff --git a/source4/selftest/output/plain.pm b/source4/selftest/output/plain.pm
index 0f70c6085e..59b89f84c9 100644
--- a/source4/selftest/output/plain.pm
+++ b/source4/selftest/output/plain.pm
@@ -20,17 +20,17 @@ sub new($$$$) {
sub output_msg($$$);
-sub start_testsuite($$)
+sub start_testsuite($$$)
{
- my ($self, $state) = @_;
+ 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 .= "] $state->{NAME}\n",
+ $out .= "] $name\n",
- $self->{test_output}->{$state->{NAME}} = "" unless($self->{verbose});
+ $self->{test_output}->{$name} = "" unless($self->{verbose});
$self->output_msg($state, "CMD: $state->{CMD}\n");
@@ -55,9 +55,9 @@ sub control_msg($$$)
$self->output_msg($state, $output);
}
-sub end_testsuite($$$$$)
+sub end_testsuite($$$$$$)
{
- my ($self, $state, $expected_ret, $ret, $envlog) = @_;
+ my ($self, $name, $state, $expected_ret, $ret, $envlog) = @_;
my $out = "";
$self->output_msg($state, "ENVLOG: $envlog\n") if ($envlog ne "");
@@ -67,7 +67,7 @@ sub end_testsuite($$$$$)
}
if ($ret != $expected_ret and $self->{immediate} and not $self->{verbose}) {
- $out .= $self->{test_output}->{$state->{NAME}};
+ $out .= $self->{test_output}->{$name};
}
print $out;