From dc2a858bed2ba12080f915a2550e5d46286e52a1 Mon Sep 17 00:00:00 2001 From: Rasmus Johansson Date: Fri, 17 Apr 2020 08:28:31 +0000 Subject: MDEV-22270 JUnit patch: test name contains classname --- mysql-test/lib/mtr_report.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'mysql-test/lib/mtr_report.pm') diff --git a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm index a3282704dd2..6c65982bafa 100644 --- a/mysql-test/lib/mtr_report.pm +++ b/mysql-test/lib/mtr_report.pm @@ -466,6 +466,7 @@ sub mtr_report_stats ($$$$) { } $test_time = sprintf("%.3f", $test->{timer} / 1000); + $test->{'name'} =~ s/$current_suite\.//; $xml_report .= qq(\t\t{'comment'}; -- cgit v1.2.1 From 95fa7bc89ddd248023bbe54aa3d9ba4d9903a4c2 Mon Sep 17 00:00:00 2001 From: Rasmus Johansson Date: Mon, 4 May 2020 10:10:07 +0000 Subject: MDEV-22273 jUnit patch: xml test result differs from MTR output in case if retry --- mysql-test/lib/mtr_report.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'mysql-test/lib/mtr_report.pm') diff --git a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm index 6c65982bafa..0b99eafa4cf 100644 --- a/mysql-test/lib/mtr_report.pm +++ b/mysql-test/lib/mtr_report.pm @@ -472,12 +472,15 @@ sub mtr_report_stats ($$$$) { my $comment = $test->{'comment'}; $comment =~ s/[\"]//g; - if ($test->{'result'} eq "MTR_RES_FAILED") { - $xml_report .= qq(>\n\t\t\t\n{'logfile'}]]>\n\t\t\t\n\t\t\n); + # if a test case has to be retried it should have the result MTR_RES_FAILED in jUnit XML + if ($test->{'result'} eq "MTR_RES_FAILED" || $test->{'retries'}) { + my $logcontents = $test->{'logfile-failed'} || $test->{'logfile'}; + + $xml_report .= qq(>\n\t\t\t\n\n\t\t\t\n\t\t\n); } elsif ($test->{'result'} eq "MTR_RES_SKIPPED" && $test->{'disable'}) { - $xml_report .= qq(>\n\t\t\t\n\t\t\n); + $xml_report .= qq(>\n\t\t\t\n\t\t\n); } elsif ($test->{'result'} eq "MTR_RES_SKIPPED") { - $xml_report .= qq(>\n\t\t\t\n\t\t\n); + $xml_report .= qq(>\n\t\t\t\n\t\t\n); } else { $xml_report .= " />\n"; } -- cgit v1.2.1