diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-20 15:54:05 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 06:28:48 +0100 |
commit | 70c9374305fdb39ca92b3490bfdbc23043960637 (patch) | |
tree | fc1505fd56e2e55c67a2759770cf5c3bf9a6ffbc /source4/selftest/output | |
parent | 254f1c6fee18dd14d2f9f97d65e6fe9ef04c26f2 (diff) | |
download | samba-70c9374305fdb39ca92b3490bfdbc23043960637.tar.gz samba-70c9374305fdb39ca92b3490bfdbc23043960637.tar.bz2 samba-70c9374305fdb39ca92b3490bfdbc23043960637.zip |
r26548: Remove remaining variables from state hash.
(This used to be commit 84f5b3e257241f699f3e51d8f282fa00cfd1000a)
Diffstat (limited to 'source4/selftest/output')
-rw-r--r-- | source4/selftest/output/buildfarm.pm | 4 | ||||
-rw-r--r-- | source4/selftest/output/html.pm | 23 | ||||
-rw-r--r-- | source4/selftest/output/plain.pm | 16 |
3 files changed, 16 insertions, 27 deletions
diff --git a/source4/selftest/output/buildfarm.pm b/source4/selftest/output/buildfarm.pm index 958124259e..81ffd5012c 100644 --- a/source4/selftest/output/buildfarm.pm +++ b/source4/selftest/output/buildfarm.pm @@ -21,6 +21,9 @@ sub start_testsuite($$$) my ($self, $name, $state) = @_; my $out = ""; + $state->{NAME} = $name; + $state->{START_TIME} = time(); + my $duration = $state->{START_TIME} - $self->{statistics}->{START_TIME}; $out .= "--==--==--==--==--==--==--==--==--==--==--\n"; $out .= "Running test $name (level 0 stdout)\n"; @@ -28,7 +31,6 @@ sub start_testsuite($$$) $out .= scalar(localtime())."\n"; $out .= "SELFTEST RUNTIME: " . $duration . "s\n"; $out .= "NAME: $name\n"; - $out .= "CMD: $state->{CMD}\n"; $self->{test_output}->{$name} = ""; diff --git a/source4/selftest/output/html.pm b/source4/selftest/output/html.pm index 7f3cfac8cd..13d2f10938 100644 --- a/source4/selftest/output/html.pm +++ b/source4/selftest/output/html.pm @@ -84,6 +84,7 @@ sub start_testsuite($$$) failure => 0 }; + $state->{NAME} = $name; $state->{HTMLFILE} = "$name.html"; $state->{HTMLFILE} =~ s/[:\t\n \/]/_/g; @@ -91,26 +92,6 @@ sub start_testsuite($$$) $self->print_html_header("Test Results for $name", *TEST); - if ($state->{ENVNAME} ne "none") { - print TEST "<h2>Environment settings</h2>\n"; - - print TEST " <table>\n"; - print TEST " <tr><td><b>Variable name</b></td><td><b>Variable value</b></td></tr>\n"; - foreach (keys %{$state->{ENVVARS}}) { - print TEST " <tr><td>$_</td><td>"; - my $val = $state->{ENVVARS}->{$_}; - if ($val =~ /^\.\// and -r $val) { - print TEST "<a href=\"../$val\">$val</a>"; - } elsif (-r $val) { - print TEST "<a href=\"$val\">$val</a>"; - } else { - print TEST $val; - } - print TEST "</td></tr>\n"; - } - print TEST " </table>\n"; - } - print TEST "<h2>Tests</h2>\n"; print TEST " <table>\n"; @@ -140,7 +121,6 @@ sub end_testsuite($$$$$) print TEST "</table>\n"; - print TEST "<div class=\"command\">$state->{CMD}</div>\n"; print TEST "<div class=\"duration\">Duration: " . (time() - $state->{START_TIME}) . "s</div>\n"; $self->print_html_footer(*TEST); @@ -200,6 +180,7 @@ sub start_test($$$) my ($self, $state, $parents, $testname) = @_; if ($#$parents == -1) { + $state->{START_TIME} = time(); $self->start_testsuite($testname, $state); return; } diff --git a/source4/selftest/output/plain.pm b/source4/selftest/output/plain.pm index a11ada871a..af353c3cff 100644 --- a/source4/selftest/output/plain.pm +++ b/source4/selftest/output/plain.pm @@ -6,8 +6,8 @@ use Exporter; use strict; -sub new($$$$$) { - my ($class, $summaryfile, $verbose, $immediate, $statistics) = @_; +sub new($$$$$$) { + my ($class, $summaryfile, $verbose, $immediate, $statistics, $totaltests) = @_; my $self = { verbose => $verbose, immediate => $immediate, @@ -16,6 +16,8 @@ sub new($$$$$) { suitesfailed => [], skips => {}, summaryfile => $summaryfile, + index => 0, + totalsuites => $totaltests, }; bless($self, $class); } @@ -26,14 +28,16 @@ sub start_testsuite($$$) { my ($self, $name, $state) = @_; + $self->{index}++; + $state->{NAME} = $name; + $state->{START_TIME} = time(); + my $duration = $state->{START_TIME} - $self->{statistics}->{START_TIME}; $self->{test_output}->{$name} = "" unless($self->{verbose}); - $self->output_msg($state, "CMD: $state->{CMD}\n"); - my $out = ""; - $out .= "[$state->{INDEX}/$state->{TOTAL} in ".$duration."s"; + $out .= "[$self->{index}/$self->{totalsuites} in ".$duration."s"; $out .= sprintf(", %d errors", $self->{statistics}->{SUITES_FAIL}) if ($self->{statistics}->{SUITES_FAIL} > 0); $out .= "] $name\n", print "$out"; @@ -162,6 +166,8 @@ sub skip_testsuite($$) my ($self, $name, $reason) = @_; push (@{$self->{skips}->{$reason}}, $name); + + $self->{totalsuites}--; } 1; |