diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-04-14 10:33:59 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-04-14 10:33:59 +0300 |
commit | 5008171b05e0d3b8b5f4af312b94a312281e77c7 (patch) | |
tree | 4a551df68976e937d18a7416d799c7a5605cb12f /mysql-test/lib | |
parent | 61f84bba603aa85957b48d151f9ddf5ba4e71ab1 (diff) | |
parent | 13d0641710802bd57b0c0d88c9fc321932014994 (diff) | |
download | mariadb-git-5008171b05e0d3b8b5f4af312b94a312281e77c7.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'mysql-test/lib')
-rw-r--r-- | mysql-test/lib/mtr_report.pm | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm index 473b21441e2..8144a6ef02e 100644 --- a/mysql-test/lib/mtr_report.pm +++ b/mysql-test/lib/mtr_report.pm @@ -497,23 +497,21 @@ sub mtr_report_stats ($$$$) { $test_time = sprintf("%.3f", $test->{timer} / 1000); $test->{'name'} =~ s/$current_suite\.//; - 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"; + my $combinations; + if (defined($test->{combinations})){ + $combinations = join ',', sort @{$test->{combinations}}; } else { - $test_result = $test->{'result'}; + $combinations = ""; } - $xml_report .= qq(\t\t<testcase assertions="" classname="$current_suite" name="$test->{'name'}" status="$test_result" time="$test_time"); + $xml_report .= qq(\t\t<testcase assertions="" classname="$current_suite" name="$test->{'name'}" ). + qq(status="$test->{'result'}" time="$test_time" combinations="$combinations"); - my $comment = $test->{'comment'}; - $comment =~ s/[\"]//g; + my $comment= replace_special_symbols($test->{'comment'}); - # 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'} > 0) { + if ($test->{'result'} eq "MTR_RES_FAILED") { my $logcontents = $test->{'logfile-failed'} || $test->{'logfile'}; + $logcontents= $logcontents.$test->{'warnings'}."\n"; # remove any double ] that would end the cdata $logcontents =~ s/]]/\x{fffd}/g; # replace wide characters that aren't allowed in XML 1.0 @@ -576,6 +574,16 @@ sub mtr_print_line () { print '-' x 74 . "\n"; } +sub replace_special_symbols($) { + my $text= shift; + $text =~ s/&/&/g; + $text =~ s/'/'/g; + $text =~ s/"/"/g; + $text =~ s/</</g; + $text =~ s/>/>/g; + return $text; +} + sub mtr_print_thick_line { my $char= shift || '='; |