Fixed test runner output for Jenkins xUnit publish

The Jenkins JUnit publisher handled our output, but
the Jenkins xUnit plugin's JUnit support did not like
that we didn't have a <testsuites> element wrapping
everything.  They both work with this fix.

llvm-svn: 247962
This commit is contained in:
Todd Fiala 2015-09-18 01:43:08 +00:00
parent 7d8263bf1d
commit 038bf833c4
1 changed files with 2 additions and 1 deletions

View File

@ -708,6 +708,7 @@ class XunitFormatter(ResultsFormatter):
# Output the header.
self.out_file.write(
'<?xml version="1.0" encoding="{}"?>\n'
'<testsuites>'
'<testsuite name="{}" tests="{}" errors="{}" failures="{}" '
'skip="{}"{}>\n'.format(
self.text_encoding,
@ -723,7 +724,7 @@ class XunitFormatter(ResultsFormatter):
self.out_file.write(result + '\n')
# Close off the test suite.
self.out_file.write('</testsuite>\n')
self.out_file.write('</testsuite></testsuites>\n')
super(XunitFormatter, self).end_session()