diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-06-12 15:05:59 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-06-12 15:08:14 +0200 |
commit | 7c3f31a26213035aa57a4a615c7760bc109edebc (patch) | |
tree | 15fef273f31e59890b135befae121474d9c8299b /selftest | |
parent | 6e4c57ced543e7b572beb567526df21a4c880eef (diff) | |
download | samba-7c3f31a26213035aa57a4a615c7760bc109edebc.tar.gz samba-7c3f31a26213035aa57a4a615c7760bc109edebc.tar.bz2 samba-7c3f31a26213035aa57a4a615c7760bc109edebc.zip |
subunit: Pass canonical names of test results to formatters and filters.
Diffstat (limited to 'selftest')
-rw-r--r-- | selftest/Subunit.pm | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/selftest/Subunit.pm b/selftest/Subunit.pm index 42d16e3471..ecd712a9a3 100644 --- a/selftest/Subunit.pm +++ b/selftest/Subunit.pm @@ -54,35 +54,37 @@ sub parse_results($$$) unless ($terminated) { $statistics->{TESTS_ERROR}++; - $msg_ops->end_test($testname, "error", 1, "reason ($result) interrupted"); + $msg_ops->end_test($testname, "error", 1, + "reason ($result) interrupted"); return 1; } } if ($result eq "success" or $result eq "successful") { pop(@$open_tests); #FIXME: Check that popped value == $testname $statistics->{TESTS_EXPECTED_OK}++; - $msg_ops->end_test($testname, $result, 0, $reason); + $msg_ops->end_test($testname, "success", 0, $reason); } elsif ($result eq "xfail" or $result eq "knownfail") { pop(@$open_tests); #FIXME: Check that popped value == $testname $statistics->{TESTS_EXPECTED_FAIL}++; - $msg_ops->end_test($testname, $result, 0, $reason); + $msg_ops->end_test($testname, "xfail", 0, $reason); $expected_fail++; } elsif ($result eq "failure" or $result eq "fail") { pop(@$open_tests); #FIXME: Check that popped value == $testname $statistics->{TESTS_UNEXPECTED_FAIL}++; - $msg_ops->end_test($testname, $result, 1, $reason); + $msg_ops->end_test($testname, "failure", 1, $reason); $unexpected_fail++; } elsif ($result eq "skip") { $statistics->{TESTS_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, $result, 0, $reason); + $msg_ops->end_test($testname, "skip", 0, $reason); } elsif ($result eq "error") { $statistics->{TESTS_ERROR}++; pop(@$open_tests); #FIXME: Check that popped value == $testname - $msg_ops->end_test($testname, $result, 1, $reason); + $msg_ops->end_test($testname, "error", 1, $reason); $unexpected_err++; } elsif ($result eq "skip-testsuite") { $msg_ops->skip_testsuite($testname); |