diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-08-26 14:07:23 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:02:34 -0500 |
commit | 8e789517b723955f1530837058d5e9fe98aba19f (patch) | |
tree | cc666a66795d9424f52599e8d0d43b0e92e7b4f1 /source4/selftest/output/html.pm | |
parent | cc253ae4a0c7e9dec7eedf690d2099924ac4ac5d (diff) | |
download | samba-8e789517b723955f1530837058d5e9fe98aba19f.tar.gz samba-8e789517b723955f1530837058d5e9fe98aba19f.tar.bz2 samba-8e789517b723955f1530837058d5e9fe98aba19f.zip |
r24665: Close file handles properly.
(This used to be commit 7f914b08a77c6035918d9f4463990f1dd8f3efb9)
Diffstat (limited to 'source4/selftest/output/html.pm')
-rw-r--r-- | source4/selftest/output/html.pm | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/source4/selftest/output/html.pm b/source4/selftest/output/html.pm index 6e83d811e8..d181516002 100644 --- a/source4/selftest/output/html.pm +++ b/source4/selftest/output/html.pm @@ -5,6 +5,7 @@ use Exporter; @ISA = qw(Exporter); use strict; +use warnings; sub new($$$$) { my ($class, $dirname, $statistics) = @_; @@ -48,9 +49,9 @@ sub output_msg($$$) my ($self, $state, $output) = @_; unless (defined($self->{active_test})) { - print TEST "$output<br>"; + print TEST "$output<br/>"; } else { - $self->{msg} .= "$output<br>"; + $self->{msg} .= "$output<br/>"; } } @@ -63,17 +64,17 @@ sub end_testsuite($$$$$) close(TEST); - print {$self->{INDEX}} "<tr><td><a href=\"$state->{HTMLFILE}\">$state->{NAME}</a></td><td>$state->{ENVNAME}</td>"; + print INDEX "<tr><td><a href=\"$state->{HTMLFILE}\">$state->{NAME}</a></td><td>$state->{ENVNAME}</td>"; if ($ret == $expected_ret) { - print {$self->{INDEX}} "<td bgcolor=\"green\">OK</td>"; + print INDEX "<td bgcolor=\"green\">OK</td>"; } else { - print {$self->{INDEX}} "<td bgcolor=\"red\">FAIL</td>"; + print INDEX "<td bgcolor=\"red\">FAIL</td>"; } - print {$self->{INDEX}} "<td>" . (time() - $state->{START_TIME}) . "</td>\n"; + print INDEX "<td>" . (time() - $state->{START_TIME}) . "</td>\n"; - print {$self->{INDEX}} "</tr>\n"; + print INDEX "</tr>\n"; } sub start_test($$$) @@ -106,11 +107,13 @@ sub end_test($$$$$) sub summary($) { my ($self) = @_; - print {$self->{INDEX}} "</table>\n"; - print {$self->{INDEX}} "FAILED ($self->{statistics}->{TESTS_UNEXPECTED_FAIL} failures and $self->{statistics}->{TESTS_ERROR} errors in $self->{statistics}->{SUITES_FAIL} testsuites)\n"; + print INDEX "</table>\n"; + print INDEX "FAILED ($self->{statistics}->{TESTS_UNEXPECTED_FAIL} failures and $self->{statistics}->{TESTS_ERROR} errors in $self->{statistics}->{SUITES_FAIL} testsuites)\n"; - print {$self->{INDEX}} "</body>\n"; - print {$self->{INDEX}} "</html>\n"; + print INDEX "</body>\n"; + print INDEX "</html>\n"; + + close(INDEX); } sub missing_env($$$) @@ -124,7 +127,7 @@ sub skip_testsuite($$) { my ($self, $name) = @_; - print {$self->{INDEX}} "<tr><td>$name</td><td>N/A</td><td bgcolor=\"yellow\">SKIPPED</td><td>N/A</td></tr>\n"; + print INDEX "<tr><td>$name</td><td>N/A</td><td bgcolor=\"yellow\">SKIPPED</td><td>N/A</td></tr>\n"; } 1; |