mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
r24665: Close file handles properly.
(This used to be commit 7f914b08a7
)
This commit is contained in:
parent
cc253ae4a0
commit
8e789517b7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user