diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/lit/lit/Test.py | 11 | ||||
-rwxr-xr-x | utils/lit/lit/main.py | 3 |
2 files changed, 8 insertions, 6 deletions
diff --git a/utils/lit/lit/Test.py b/utils/lit/lit/Test.py index 2e0f478..b6dabe1 100644 --- a/utils/lit/lit/Test.py +++ b/utils/lit/lit/Test.py @@ -200,12 +200,13 @@ class Test: def getJUnitXML(self): test_name = self.path_in_suite[-1] test_path = self.path_in_suite[:-1] - - xml = "<testcase classname='" + self.suite.name + "." + "/".join(test_path) + "'" + " name='" + test_name + "'" + safe_name = self.suite.name.replace(".","-") + xml = "<testcase classname='" + safe_name + "." + \ + "/".join(test_path) + "'" + " name='" + test_name + "'" xml += " time='%.2f'" % (self.result.elapsed,) if self.result.code.isFailure: - xml += ">\n\t<failure >\n" + escape(self.result.output) - xml += "\n\t</failure>\n</testcase>" + xml += ">\n\t<failure >\n" + escape(self.result.output) + xml += "\n\t</failure>\n</testcase>" else: - xml += "/>" + xml += "/>" return xml
\ No newline at end of file diff --git a/utils/lit/lit/main.py b/utils/lit/lit/main.py index 90f724e..f2aedc9 100755 --- a/utils/lit/lit/main.py +++ b/utils/lit/lit/main.py @@ -444,7 +444,8 @@ def main(builtinParameters = {}): xunit_output_file.write("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n") xunit_output_file.write("<testsuites>\n") for suite_name, suite in by_suite.items(): - xunit_output_file.write("<testsuite name='" + suite_name + "'") + safe_suite_name = suite_name.replace(".", "-") + xunit_output_file.write("<testsuite name='" + safe_suite_name + "'") xunit_output_file.write(" tests='" + str(suite['passes'] + suite['failures']) + "'") xunit_output_file.write(" failures='" + str(suite['failures']) + |