Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
95fa7bc8
Commit
95fa7bc8
authored
May 04, 2020
by
Rasmus Johansson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-22273 jUnit patch: xml test result differs from MTR output in case if retry
parent
dc2a858b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
mysql-test/lib/mtr_report.pm
mysql-test/lib/mtr_report.pm
+7
-4
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+1
-0
No files found.
mysql-test/lib/mtr_report.pm
View file @
95fa7bc8
...
...
@@ -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<failure message="" type="$test->{'result'}">\n<![CDATA[$test->{'logfile'}]]>\n\t\t\t</failure>\n\t\t</testcase>\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<failure message="" type="MTR_RES_FAILED">\n<![CDATA[$logcontents]]>\n\t\t\t</failure>\n\t\t</testcase>\n)
;
}
elsif
(
$test
->
{'
result
'}
eq
"
MTR_RES_SKIPPED
"
&&
$test
->
{'
disable
'})
{
$xml_report
.=
qq(>\n\t\t\t<disabled message="$comment" type="
$test->{'result'}
"/>\n\t\t</testcase>\n)
;
$xml_report
.=
qq(>\n\t\t\t<disabled message="$comment" type="
MTR_RES_SKIPPED
"/>\n\t\t</testcase>\n)
;
}
elsif
(
$test
->
{'
result
'}
eq
"
MTR_RES_SKIPPED
")
{
$xml_report
.=
qq(>\n\t\t\t<skipped message="$comment" type="
$test->{'result'}
"/>\n\t\t</testcase>\n)
;
$xml_report
.=
qq(>\n\t\t\t<skipped message="$comment" type="
MTR_RES_SKIPPED
"/>\n\t\t</testcase>\n)
;
}
else
{
$xml_report
.=
"
/>
\n
";
}
...
...
mysql-test/mysql-test-run.pl
View file @
95fa7bc8
...
...
@@ -769,6 +769,7 @@ sub run_test_server ($$$) {
if
(
$result
->
is_failed
()
)
{
my
$worker_logdir
=
$result
->
{
savedir
};
my
$log_file_name
=
dirname
(
$worker_logdir
)
.
"
/
"
.
$result
->
{
shortname
}
.
"
.log
";
$result
->
{'
logfile-failed
'}
=
mtr_lastlinesfromfile
(
$log_file_name
,
20
);
rename
$log_file_name
,
$log_file_name
.
"
.failed
";
}
delete
(
$result
->
{
result
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment