]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix pytest junitxml output processing for make check
authorTom Krizek <tkrizek@isc.org>
Mon, 30 Oct 2023 15:16:33 +0000 (16:16 +0100)
committerTom Krizek <tkrizek@isc.org>
Thu, 2 Nov 2023 08:59:23 +0000 (09:59 +0100)
Not every element tagged `skipped` in the JUnitXML tree has to contain
the `type` attribute. An example of that is a test that results in
xpass.

This has been verified with pytest version 7.4.2 and prior.

bin/tests/system/convert-junit-to-trs.py

index 7d490fa550e6ea7640896d0288b5d81ea901b3e5..b3d44b5567255ce2d1a9464b8111b7212e3b7b9b 100755 (executable)
@@ -34,7 +34,7 @@ def junit_to_trs(junit_xml):
                 res = "ERROR"
                 has_error = True
             elif node.tag == "skipped":
-                if node.attrib["type"] == "pytest.xfail":
+                if node.attrib.get("type") == "pytest.xfail":
                     res = "XFAIL"
                 else:
                     res = "SKIP"