summaryrefslogtreecommitdiffstats
path: root/source4/selftest
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-04-16 00:03:00 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-04-16 00:03:00 +0200
commitd3729a8efa1c7e848d263ef320d3114144477be3 (patch)
treed661a55f70db6ec1ccfcb4ea73f4482240aaa735 /source4/selftest
parente4cfb2d3169b9bf3adfe58b1cd666a525962d142 (diff)
downloadsamba-d3729a8efa1c7e848d263ef320d3114144477be3.tar.gz
samba-d3729a8efa1c7e848d263ef320d3114144477be3.tar.xz
samba-d3729a8efa1c7e848d263ef320d3114144477be3.zip
Support knownfail Subunit command.
(This used to be commit ad58a508542bd93115be0ad826fb93aa3d349658)
Diffstat (limited to 'source4/selftest')
-rw-r--r--source4/selftest/Subunit.pm15
1 files changed, 13 insertions, 2 deletions
diff --git a/source4/selftest/Subunit.pm b/source4/selftest/Subunit.pm
index e5c61ca9ba7..05e51da5412 100644
--- a/source4/selftest/Subunit.pm
+++ b/source4/selftest/Subunit.pm
@@ -20,15 +20,22 @@ sub parse_results($$$$$)
$msg_ops->control_msg($_);
$msg_ops->start_test($open_tests, $1);
push (@$open_tests, $1);
- } elsif (/^(success|successful|failure|skip|error): (.*?)( \[)?([ \t]*)\n/) {
+ } elsif (/^(success|successful|failure|skip|knownfail|error): (.*?)( \[)?([ \t]*)\n/) {
$msg_ops->control_msg($_);
my $reason = undef;
if ($3) {
$reason = "";
# reason may be specified in next lines
+ my $terminated = 0;
while(<$fh>) {
$msg_ops->control_msg($_);
- if ($_ eq "]\n") { last; } else { $reason .= $_; }
+ if ($_ eq "]\n") { $terminated = 1; last; } else { $reason .= $_; }
+ }
+
+ unless ($terminated) {
+ $statistics->{TESTS_ERROR}++;
+ $msg_ops->end_test($open_tests, $2, $1, 1, "reason interrupted");
+ return 1;
}
}
my $result = $1;
@@ -53,6 +60,10 @@ sub parse_results($$$$$)
$msg_ops->end_test($open_tests, $2, $1, 1, $reason);
$unexpected_fail++;
}
+ } elsif ($1 eq "knownfail") {
+ pop(@$open_tests); #FIXME: Check that popped value == $2
+ $statistics->{TESTS_EXPECTED_FAIL}++;
+ $msg_ops->end_test($open_tests, $2, $1, 0, $reason);
} elsif ($1 eq "skip") {
$statistics->{TESTS_SKIP}++;
pop(@$open_tests); #FIXME: Check that popped value == $2