summaryrefslogtreecommitdiff
path: root/source4/selftest/Subunit.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-20 17:07:21 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 06:28:50 +0100
commitb3b3af05f14c2d8d946ea024fcba1852949cb484 (patch)
tree74ab9024a40390a1266616fe943293754d048c03 /source4/selftest/Subunit.pm
parentbf20aa02e6dc5934d693eacfa0b30a771f03bc63 (diff)
downloadsamba-b3b3af05f14c2d8d946ea024fcba1852949cb484.tar.gz
samba-b3b3af05f14c2d8d946ea024fcba1852949cb484.tar.bz2
samba-b3b3af05f14c2d8d946ea024fcba1852949cb484.zip
r26552: remove unused state variable, use dot as path separator for test names.
(This used to be commit a84975610c2825e9ceecdd47d744282bd55220be)
Diffstat (limited to 'source4/selftest/Subunit.pm')
-rw-r--r--source4/selftest/Subunit.pm32
1 files changed, 16 insertions, 16 deletions
diff --git a/source4/selftest/Subunit.pm b/source4/selftest/Subunit.pm
index ea08ef8f38..e5c61ca9ba 100644
--- a/source4/selftest/Subunit.pm
+++ b/source4/selftest/Subunit.pm
@@ -6,9 +6,9 @@ require Exporter;
use strict;
-sub parse_results($$$$$$)
+sub parse_results($$$$$)
{
- my ($msg_ops, $msg_state, $statistics, $fh, $expecting_failure, $open_tests) = @_;
+ my ($msg_ops, $statistics, $fh, $expecting_failure, $open_tests) = @_;
my $unexpected_ok = 0;
my $expected_fail = 0;
my $unexpected_fail = 0;
@@ -17,59 +17,59 @@ sub parse_results($$$$$$)
while(<$fh>) {
if (/^test: (.+)\n/) {
- $msg_ops->control_msg($msg_state, $_);
- $msg_ops->start_test($msg_state, $open_tests, $1);
+ $msg_ops->control_msg($_);
+ $msg_ops->start_test($open_tests, $1);
push (@$open_tests, $1);
} elsif (/^(success|successful|failure|skip|error): (.*?)( \[)?([ \t]*)\n/) {
- $msg_ops->control_msg($msg_state, $_);
+ $msg_ops->control_msg($_);
my $reason = undef;
if ($3) {
$reason = "";
# reason may be specified in next lines
while(<$fh>) {
- $msg_ops->control_msg($msg_state, $_);
+ $msg_ops->control_msg($_);
if ($_ eq "]\n") { last; } else { $reason .= $_; }
}
}
my $result = $1;
if ($1 eq "success" or $1 eq "successful") {
pop(@$open_tests); #FIXME: Check that popped value == $2
- if ($expecting_failure->("$msg_state->{NAME}/$2")) {
+ if ($expecting_failure->(join(".", @$open_tests) . ".$2")) {
$statistics->{TESTS_UNEXPECTED_OK}++;
- $msg_ops->end_test($msg_state, $open_tests, $2, $1, 1, $reason);
+ $msg_ops->end_test($open_tests, $2, $1, 1, $reason);
$unexpected_ok++;
} else {
$statistics->{TESTS_EXPECTED_OK}++;
- $msg_ops->end_test($msg_state, $open_tests, $2, $1, 0, $reason);
+ $msg_ops->end_test($open_tests, $2, $1, 0, $reason);
}
} elsif ($1 eq "failure") {
pop(@$open_tests); #FIXME: Check that popped value == $2
- if ($expecting_failure->("$msg_state->{NAME}/$2")) {
+ if ($expecting_failure->(join(".", @$open_tests) . ".$2")) {
$statistics->{TESTS_EXPECTED_FAIL}++;
- $msg_ops->end_test($msg_state, $open_tests, $2, $1, 0, $reason);
+ $msg_ops->end_test($open_tests, $2, $1, 0, $reason);
$expected_fail++;
} else {
$statistics->{TESTS_UNEXPECTED_FAIL}++;
- $msg_ops->end_test($msg_state, $open_tests, $2, $1, 1, $reason);
+ $msg_ops->end_test($open_tests, $2, $1, 1, $reason);
$unexpected_fail++;
}
} elsif ($1 eq "skip") {
$statistics->{TESTS_SKIP}++;
pop(@$open_tests); #FIXME: Check that popped value == $2
- $msg_ops->end_test($msg_state, $open_tests, $2, $1, 0, $reason);
+ $msg_ops->end_test($open_tests, $2, $1, 0, $reason);
} elsif ($1 eq "error") {
$statistics->{TESTS_ERROR}++;
pop(@$open_tests); #FIXME: Check that popped value == $2
- $msg_ops->end_test($msg_state, $open_tests, $2, $1, 1, $reason);
+ $msg_ops->end_test($open_tests, $2, $1, 1, $reason);
$unexpected_err++;
}
} else {
- $msg_ops->output_msg($msg_state, $_);
+ $msg_ops->output_msg($_);
}
}
while ($#$open_tests > $orig_open_len) {
- $msg_ops->end_test($msg_state, $open_tests, pop(@$open_tests), "error", 1,
+ $msg_ops->end_test($open_tests, pop(@$open_tests), "error", 1,
"was started but never finished!");
$statistics->{TESTS_ERROR}++;
$unexpected_err++;