[Lldb-commits] [lldb] r247962 - Fixed test runner output for Jenkins xUnit publish

Todd Fiala via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 17 18:43:09 PDT 2015


Author: tfiala
Date: Thu Sep 17 20:43:08 2015
New Revision: 247962

URL: http://llvm.org/viewvc/llvm-project?rev=247962&view=rev
Log:
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.

Modified:
    lldb/trunk/test/test_results.py

Modified: lldb/trunk/test/test_results.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/test_results.py?rev=247962&r1=247961&r2=247962&view=diff
==============================================================================
--- lldb/trunk/test/test_results.py (original)
+++ lldb/trunk/test/test_results.py Thu Sep 17 20:43:08 2015
@@ -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()
 




More information about the lldb-commits mailing list