mirror of
https://github.com/samba-team/samba.git
synced 2025-09-18 09:44:19 +03:00
subunit: Pass canonical names of test results to formatters and filters.
This commit is contained in:
@@ -54,35 +54,37 @@ sub parse_results($$$)
|
|||||||
|
|
||||||
unless ($terminated) {
|
unless ($terminated) {
|
||||||
$statistics->{TESTS_ERROR}++;
|
$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;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($result eq "success" or $result eq "successful") {
|
if ($result eq "success" or $result eq "successful") {
|
||||||
pop(@$open_tests); #FIXME: Check that popped value == $testname
|
pop(@$open_tests); #FIXME: Check that popped value == $testname
|
||||||
$statistics->{TESTS_EXPECTED_OK}++;
|
$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") {
|
} elsif ($result eq "xfail" or $result eq "knownfail") {
|
||||||
pop(@$open_tests); #FIXME: Check that popped value == $testname
|
pop(@$open_tests); #FIXME: Check that popped value == $testname
|
||||||
$statistics->{TESTS_EXPECTED_FAIL}++;
|
$statistics->{TESTS_EXPECTED_FAIL}++;
|
||||||
$msg_ops->end_test($testname, $result, 0, $reason);
|
$msg_ops->end_test($testname, "xfail", 0, $reason);
|
||||||
$expected_fail++;
|
$expected_fail++;
|
||||||
} elsif ($result eq "failure" or $result eq "fail") {
|
} elsif ($result eq "failure" or $result eq "fail") {
|
||||||
pop(@$open_tests); #FIXME: Check that popped value == $testname
|
pop(@$open_tests); #FIXME: Check that popped value == $testname
|
||||||
$statistics->{TESTS_UNEXPECTED_FAIL}++;
|
$statistics->{TESTS_UNEXPECTED_FAIL}++;
|
||||||
$msg_ops->end_test($testname, $result, 1, $reason);
|
$msg_ops->end_test($testname, "failure", 1, $reason);
|
||||||
$unexpected_fail++;
|
$unexpected_fail++;
|
||||||
} elsif ($result eq "skip") {
|
} elsif ($result eq "skip") {
|
||||||
$statistics->{TESTS_SKIP}++;
|
$statistics->{TESTS_SKIP}++;
|
||||||
|
# Allow tests to be skipped without prior announcement of test
|
||||||
my $last = pop(@$open_tests);
|
my $last = pop(@$open_tests);
|
||||||
if (defined($last) and $last ne $testname) {
|
if (defined($last) and $last ne $testname) {
|
||||||
push (@$open_tests, $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") {
|
} elsif ($result eq "error") {
|
||||||
$statistics->{TESTS_ERROR}++;
|
$statistics->{TESTS_ERROR}++;
|
||||||
pop(@$open_tests); #FIXME: Check that popped value == $testname
|
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++;
|
$unexpected_err++;
|
||||||
} elsif ($result eq "skip-testsuite") {
|
} elsif ($result eq "skip-testsuite") {
|
||||||
$msg_ops->skip_testsuite($testname);
|
$msg_ops->skip_testsuite($testname);
|
||||||
|
Reference in New Issue
Block a user