summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-19 14:24:31 +1100
committerAndrew Tridgell <tridge@samba.org>2010-03-20 16:50:27 +1100
commit77b77e6ba13137522b542d364891aba031a3ede8 (patch)
treec030bab9817060e4b6ff151ce0a63ce48d6caacf
parenta52b3dfb26f01ca93daa3a69d19c27dd2de922fb (diff)
downloadsamba-77b77e6ba13137522b542d364891aba031a3ede8.tar.gz
samba-77b77e6ba13137522b542d364891aba031a3ede8.tar.bz2
samba-77b77e6ba13137522b542d364891aba031a3ede8.zip
subunit: keep total error and failure counts
-rw-r--r--selftest/Subunit/Filter.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/selftest/Subunit/Filter.pm b/selftest/Subunit/Filter.pm
index 896721a67b..4a94f258f1 100644
--- a/selftest/Subunit/Filter.pm
+++ b/selftest/Subunit/Filter.pm
@@ -88,20 +88,24 @@ sub end_test($$$$$)
if (($result eq "fail" or $result eq "failure") and not $unexpected) {
$result = "xfail";
$self->{xfail_added}++;
+ $self->{total_xfail}++;
}
my $xfail_reason = find_in_list($self->{expected_failures}, $testname);
if (defined($xfail_reason) and ($result eq "fail" or $result eq "failure")) {
$result = "xfail";
$self->{xfail_added}++;
+ $self->{total_xfail}++;
$reason .= $xfail_reason;
}
if ($result eq "fail" or $result eq "failure") {
$self->{fail_added}++;
+ $self->{total_fail}++;
}
if ($result eq "error") {
$self->{error_added}++;
+ $self->{total_error}++;
}
if ($self->{strip_ok_output}) {
@@ -124,6 +128,7 @@ sub start_testsuite($;$)
{
my ($self, $name) = @_;
Subunit::start_testsuite($name);
+
$self->{error_added} = 0;
$self->{fail_added} = 0;
$self->{xfail_added} = 0;
@@ -171,6 +176,9 @@ sub new {
expected_failures => $expected_failures,
strip_ok_output => $strip_ok_output,
xfail_added => 0,
+ total_xfail => 0,
+ total_error => 0,
+ total_fail => 0
};
bless($self, $class);
}