More complete JUnit XML
This commit is contained in:
parent
596b599538
commit
b1a35944ab
|
@ -2482,6 +2482,8 @@ def JUnit_xml(checker):
|
|||
|
||||
testsuite = ET.SubElement(testsuites, 'testsuite')
|
||||
testsuite.set("id", "MISRA")
|
||||
testsuite.set("name", "MISRA C:2012")
|
||||
testsuite.set("tests", "143")
|
||||
testsuite.set("failures", str(totalViolations) )
|
||||
|
||||
rules_violated = {}
|
||||
|
@ -2493,8 +2495,15 @@ def JUnit_xml(checker):
|
|||
for misra_id in sorted(rules_violated.keys(), key=misra_sort):
|
||||
testcase = ET.SubElement(testsuite, 'testcase')
|
||||
testcase.set("id", str(misra_id))
|
||||
testcase.set("name", str(misra_id))
|
||||
testcase.set("failures", str(rules_violated[misra_id]) )
|
||||
|
||||
for fail in range(rules_violated[misra_id]):
|
||||
failure = ET.SubElement(testcase, 'failure')
|
||||
failure.text = str(misra_id)
|
||||
failure.set("type", "MANDATORY")
|
||||
failure.set("message", str(misra_id))
|
||||
|
||||
res = re.split('[\.-]([0-9]*)', misra_id)
|
||||
|
||||
if res is None:
|
||||
|
|
Loading…
Reference in New Issue