mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
selftest/subunit: Remove open_tests argument from parse_results.
This commit is contained in:
parent
ed61cc5419
commit
2e311fdac5
@ -23,14 +23,14 @@ require Exporter;
|
|||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
sub parse_results($$$$)
|
sub parse_results($$$)
|
||||||
{
|
{
|
||||||
my ($msg_ops, $statistics, $fh, $open_tests) = @_;
|
my ($msg_ops, $statistics, $fh) = @_;
|
||||||
my $unexpected_ok = 0;
|
my $unexpected_ok = 0;
|
||||||
my $expected_fail = 0;
|
my $expected_fail = 0;
|
||||||
my $unexpected_fail = 0;
|
my $unexpected_fail = 0;
|
||||||
my $unexpected_err = 0;
|
my $unexpected_err = 0;
|
||||||
my $orig_open_len = $#$open_tests;
|
my $open_tests = [];
|
||||||
|
|
||||||
while(<$fh>) {
|
while(<$fh>) {
|
||||||
if (/^test: (.+)\n/) {
|
if (/^test: (.+)\n/) {
|
||||||
@ -103,7 +103,7 @@ sub parse_results($$$$)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while ($#$open_tests > $orig_open_len) {
|
while ($#$open_tests+1 > 0) {
|
||||||
$msg_ops->end_test(pop(@$open_tests), "error", 1,
|
$msg_ops->end_test(pop(@$open_tests), "error", 1,
|
||||||
"was started but never finished!");
|
"was started but never finished!");
|
||||||
$statistics->{TESTS_ERROR}++;
|
$statistics->{TESTS_ERROR}++;
|
||||||
|
@ -40,17 +40,6 @@ sub find_in_list($$)
|
|||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $statistics = {
|
|
||||||
SUITES_FAIL => 0,
|
|
||||||
|
|
||||||
TESTS_UNEXPECTED_OK => 0,
|
|
||||||
TESTS_EXPECTED_OK => 0,
|
|
||||||
TESTS_UNEXPECTED_FAIL => 0,
|
|
||||||
TESTS_EXPECTED_FAIL => 0,
|
|
||||||
TESTS_ERROR => 0,
|
|
||||||
TESTS_SKIP => 0,
|
|
||||||
};
|
|
||||||
|
|
||||||
sub control_msg()
|
sub control_msg()
|
||||||
{
|
{
|
||||||
# We regenerate control messages, so ignore this
|
# We regenerate control messages, so ignore this
|
||||||
|
@ -93,6 +93,6 @@ my $statistics = {
|
|||||||
|
|
||||||
my $msg_ops = new Subunit::Filter($opt_prefix, \@expected_failures);
|
my $msg_ops = new Subunit::Filter($opt_prefix, \@expected_failures);
|
||||||
|
|
||||||
parse_results($msg_ops, $statistics, *STDIN, []);
|
parse_results($msg_ops, $statistics, *STDIN);
|
||||||
|
|
||||||
0;
|
0;
|
||||||
|
@ -92,7 +92,7 @@ if ($opt_format eq "buildfarm") {
|
|||||||
die("Invalid output format '$opt_format'");
|
die("Invalid output format '$opt_format'");
|
||||||
}
|
}
|
||||||
|
|
||||||
my $expected_ret = parse_results($msg_ops, $statistics, *STDIN, []);
|
my $expected_ret = parse_results($msg_ops, $statistics, *STDIN);
|
||||||
|
|
||||||
$msg_ops->summary();
|
$msg_ops->summary();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user