summaryrefslogtreecommitdiff
path: root/mysql-test/lib/mtr_report.pm
diff options
context:
space:
mode:
authorRasmus Johansson <razze@iki.fi>2020-05-20 09:37:05 +0000
committerRasmus Johansson <razze@iki.fi>2020-05-20 10:02:40 +0000
commited29782a03f1bbe39f9d9acc3ca0a42647461389 (patch)
treeb5a58e02531b89bd11aea7bb9778084e41711067 /mysql-test/lib/mtr_report.pm
parente380f447421882d8a0700e8821e55e2786b426ad (diff)
downloadmariadb-git-ed29782a03f1bbe39f9d9acc3ca0a42647461389.tar.gz
MDEV-22631 fix
Diffstat (limited to 'mysql-test/lib/mtr_report.pm')
-rw-r--r--mysql-test/lib/mtr_report.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm
index d228e9406e0..e553b0305b4 100644
--- a/mysql-test/lib/mtr_report.pm
+++ b/mysql-test/lib/mtr_report.pm
@@ -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;