mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Don't allow test-suite names with . in them in xml output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223305 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
55d5ea3be3
commit
06a1a5f256
@ -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
|
@ -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']) +
|
||||
|
Loading…
Reference in New Issue
Block a user