mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-27 12:13:20 -04:00
Support older junit XML format in test result processing
When running `make check` on a platform which has older (but still
supported) pytest, e.g. 3.4.2 on EL8, the junit to trs conversion would
fail because the junit format has different structure. Make the junit
XML processing more lenient to support both the older and newer junit
XML formats.
(cherry picked from commit bec3dd10b3)
This commit is contained in:
parent
a0dfb59c14
commit
6af67e028e
1 changed files with 1 additions and 1 deletions
|
|
@ -13,7 +13,7 @@ from xml.etree import ElementTree
|
|||
|
||||
def junit_to_trs(junit_xml):
|
||||
root = ElementTree.fromstring(junit_xml)
|
||||
testcases = root.findall("./testsuite/testcase")
|
||||
testcases = root.findall(".//testcase")
|
||||
|
||||
if len(testcases) < 1:
|
||||
print(":test-result: ERROR convert-junit-to-trs.py")
|
||||
|
|
|
|||
Loading…
Reference in a new issue