summaryrefslogtreecommitdiff
path: root/selftest
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-09-14 00:04:54 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-09-14 10:54:28 +0200
commit7d4968e161d5868b65dd5d8ef5bb0e391109c0b5 (patch)
tree37950f65458954edf35f0c7745b0f78c354183e9 /selftest
parentd3960f6b406272cc37820fad04aed6ddfd4e6cce (diff)
downloadsamba-7d4968e161d5868b65dd5d8ef5bb0e391109c0b5.tar.gz
samba-7d4968e161d5868b65dd5d8ef5bb0e391109c0b5.tar.bz2
samba-7d4968e161d5868b65dd5d8ef5bb0e391109c0b5.zip
selftest: Remove testsuite parsing.
Diffstat (limited to 'selftest')
-rw-r--r--selftest/Subunit.pm28
-rw-r--r--selftest/Subunit/Filter.pm22
2 files changed, 10 insertions, 40 deletions
diff --git a/selftest/Subunit.pm b/selftest/Subunit.pm
index 0f1f2844d6..6d50fb3988 100644
--- a/selftest/Subunit.pm
+++ b/selftest/Subunit.pm
@@ -34,7 +34,7 @@ sub parse_results($$)
$msg_ops->control_msg($_);
$msg_ops->start_test($1);
push (@$open_tests, $1);
- } elsif (/^(success|successful|failure|fail|skip|knownfail|error|xfail|skip-testsuite|testsuite-failure|testsuite-xfail|testsuite-success|testsuite-error): (.*?)( \[)?([ \t]*)( multipart)?\n/) {
+ } elsif (/^(success|successful|failure|fail|skip|knownfail|error|xfail): (.*?)( \[)?([ \t]*)( multipart)?\n/) {
$msg_ops->control_msg($_);
my $result = $1;
my $testname = $2;
@@ -49,51 +49,39 @@ sub parse_results($$)
}
unless ($terminated) {
- $msg_ops->end_test($testname, "error", 1,
+ $msg_ops->end_test($testname, "error",
"reason ($result) interrupted\n");
return 1;
}
}
if ($result eq "success" or $result eq "successful") {
pop(@$open_tests); #FIXME: Check that popped value == $testname
- $msg_ops->end_test($testname, "success", 0, $reason);
+ $msg_ops->end_test($testname, "success", $reason);
} elsif ($result eq "xfail" or $result eq "knownfail") {
pop(@$open_tests); #FIXME: Check that popped value == $testname
- $msg_ops->end_test($testname, "xfail", 0, $reason);
+ $msg_ops->end_test($testname, "xfail", $reason);
$expected_fail++;
} elsif ($result eq "failure" or $result eq "fail") {
pop(@$open_tests); #FIXME: Check that popped value == $testname
- $msg_ops->end_test($testname, "failure", 1, $reason);
+ $msg_ops->end_test($testname, "failure", $reason);
} elsif ($result eq "skip") {
# Allow tests to be skipped without prior announcement of test
my $last = pop(@$open_tests);
if (defined($last) and $last ne $testname) {
push (@$open_tests, $testname);
}
- $msg_ops->end_test($testname, "skip", 0, $reason);
+ $msg_ops->end_test($testname, "skip", $reason);
} elsif ($result eq "error") {
pop(@$open_tests); #FIXME: Check that popped value == $testname
- $msg_ops->end_test($testname, "error", 1, $reason);
- } elsif ($result eq "skip-testsuite") {
- $msg_ops->skip_testsuite($testname);
- } elsif ($result eq "testsuite-success") {
- $msg_ops->end_testsuite($testname, "success", $reason);
- } elsif ($result eq "testsuite-failure") {
- $msg_ops->end_testsuite($testname, "failure", $reason);
- } elsif ($result eq "testsuite-xfail") {
- $msg_ops->end_testsuite($testname, "xfail", $reason);
- } elsif ($result eq "testsuite-error") {
- $msg_ops->end_testsuite($testname, "error", $reason);
+ $msg_ops->end_test($testname, "error", $reason);
}
- } elsif (/^testsuite: (.*)\n/) {
- $msg_ops->start_testsuite($1);
} else {
$msg_ops->output_msg($_);
}
}
while ($#$open_tests+1 > 0) {
- $msg_ops->end_test(pop(@$open_tests), "error", 1,
+ $msg_ops->end_test(pop(@$open_tests), "error",
"was started but never finished!\n");
}
}
diff --git a/selftest/Subunit/Filter.pm b/selftest/Subunit/Filter.pm
index 1c48426995..5ac304f1ee 100644
--- a/selftest/Subunit/Filter.pm
+++ b/selftest/Subunit/Filter.pm
@@ -29,9 +29,9 @@ sub start_test($$)
Subunit::start_test($testname);
}
-sub end_test($$$$$)
+sub end_test($$$$)
{
- my ($self, $testname, $result, $unexpected, $reason) = @_;
+ my ($self, $testname, $result, $reason) = @_;
if (defined($self->{prefix})) {
$testname = $self->{prefix}.$testname;
@@ -40,24 +40,6 @@ sub end_test($$$$$)
Subunit::end_test($testname, $result, $reason);
}
-sub skip_testsuite($;$)
-{
- my ($self, $name, $reason) = @_;
- Subunit::skip_testsuite($name, $reason);
-}
-
-sub start_testsuite($;$)
-{
- my ($self, $name) = @_;
- Subunit::start_testsuite($name);
-}
-
-sub end_testsuite($$;$)
-{
- my ($self, $name, $result, $reason) = @_;
- Subunit::end_testsuite($name, $result, $reason);
-}
-
sub new {
my ($class, $prefix) = @_;