MDEV-22631 fix

This commit is contained in:
Rasmus Johansson 2020-05-20 09:37:05 +00:00
parent f4f0ef3e37
commit 21e71766f6

View file

@ -467,7 +467,17 @@ sub mtr_report_stats ($$$$) {
$test_time = sprintf("%.3f", $test->{timer} / 1000);
$test->{'name'} =~ s/$current_suite\.//;
$xml_report .= qq(\t\t<testcase assertions="" classname="$current_suite" name="$test->{'name'}" status="$test->{'result'}" time="$test_time");
my $test_result;
# if a test case has to be retried it should have the result MTR_RES_FAILED in jUnit XML
if ($test->{'retries'} > 0) {
$test_result = "MTR_RES_FAILED";
} else {
$test_result = $test->{'result'};
}
$xml_report .= qq(\t\t<testcase assertions="" classname="$current_suite" name="$test->{'name'}" status="$test_result" time="$test_time");
my $comment = $test->{'comment'};
$comment =~ s/[\"]//g;