Skip to content

Commit db6e5bd

Browse files
committed
MDEV-22631 fix
1 parent 12277e3 commit db6e5bd

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

mysql-test/lib/mtr_report.pm

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,17 @@ sub mtr_report_stats ($$$$) {
467467

468468
$test_time = sprintf("%.3f", $test->{timer} / 1000);
469469
$test->{'name'} =~ s/$current_suite\.//;
470-
$xml_report .= qq(\t\t<testcase assertions="" classname="$current_suite" name="$test->{'name'}" status="$test->{'result'}" time="$test_time");
470+
471+
my $test_result;
472+
473+
# if a test case has to be retried it should have the result MTR_RES_FAILED in jUnit XML
474+
if ($test->{'retries'} > 0) {
475+
$test_result = "MTR_RES_FAILED";
476+
} else {
477+
$test_result = $test->{'result'};
478+
}
479+
480+
$xml_report .= qq(\t\t<testcase assertions="" classname="$current_suite" name="$test->{'name'}" status="$test_result" time="$test_time");
471481

472482
my $comment = $test->{'comment'};
473483
$comment =~ s/[\"]//g;

0 commit comments

Comments
 (0)