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:04:13 +0000
commit21e71766f66b06281d9e3f3b1dc0ad6eb11e1318 (patch)
tree1c415ced3f2d7f3e00ec64dab205e57223cb72b4 /mysql-test/lib/mtr_report.pm
parentf4f0ef3e3771281b7f25bc26cc2cbf4e2dbe325a (diff)
downloadmariadb-git-21e71766f66b06281d9e3f3b1dc0ad6eb11e1318.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 d79a71b2fb4..766f5e47e95 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;