sanitycheck: Fix xml testsuite attribute skipped
In the junit output the attribute containing the number of skipped tests must be named "skipped" instead of "skip". See e.g. https://github.com/junit-team/junit5/blob/main/platform-tests/ src/test/resources/jenkins-junit.xsd#L95 Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
This commit is contained in:
parent
989ee98771
commit
b2be804421
2 changed files with 4 additions and 4 deletions
|
@ -3109,21 +3109,21 @@ class TestSuite(DisablePyTestCollectionMixin):
|
|||
eleTestsuite = ts[0]
|
||||
eleTestsuite.attrib['failures'] = "%d" % fails
|
||||
eleTestsuite.attrib['errors'] = "%d" % errors
|
||||
eleTestsuite.attrib['skip'] = "%d" % skips
|
||||
eleTestsuite.attrib['skipped'] = "%d" % skips
|
||||
else:
|
||||
logger.info(f"Did not find any existing results for {p}")
|
||||
eleTestsuite = ET.SubElement(eleTestsuites, 'testsuite',
|
||||
name=run, time="%f" % duration,
|
||||
tests="%d" % (total),
|
||||
failures="%d" % fails,
|
||||
errors="%d" % (errors), skip="%s" % (skips))
|
||||
errors="%d" % (errors), skipped="%s" % (skips))
|
||||
|
||||
else:
|
||||
eleTestsuite = ET.SubElement(eleTestsuites, 'testsuite',
|
||||
name=run, time="%f" % duration,
|
||||
tests="%d" % (total),
|
||||
failures="%d" % fails,
|
||||
errors="%d" % (errors), skip="%s" % (skips))
|
||||
errors="%d" % (errors), skipped="%s" % (skips))
|
||||
|
||||
for _, instance in inst.items():
|
||||
if full_report:
|
||||
|
|
|
@ -106,7 +106,7 @@ def test_xunit_report(class_testsuite, test_data,
|
|||
assert filesize != 0
|
||||
|
||||
tree = ET.parse(filename)
|
||||
assert int(tree.findall('testsuite')[0].attrib["skip"]) == int(skips)
|
||||
assert int(tree.findall('testsuite')[0].attrib["skipped"]) == int(skips)
|
||||
assert int(tree.findall('testsuite')[0].attrib["failures"]) == int(fails)
|
||||
assert int(tree.findall('testsuite')[0].attrib["errors"]) == int(errors)
|
||||
assert int(tree.findall('testsuite')[0].attrib["tests"]) == int(passes+fails+skips+errors)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue