From: Tom Krizek Date: Mon, 30 Oct 2023 15:16:33 +0000 (+0100) Subject: Fix pytest junitxml output processing for make check X-Git-Tag: v9.19.18~5^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ba25ecd2d2b61d612c0f028b125e90d6d43e4bda;p=thirdparty%2Fbind9.git Fix pytest junitxml output processing for make check 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. --- diff --git a/bin/tests/system/convert-junit-to-trs.py b/bin/tests/system/convert-junit-to-trs.py index 7d490fa550e..b3d44b55672 100755 --- a/bin/tests/system/convert-junit-to-trs.py +++ b/bin/tests/system/convert-junit-to-trs.py @@ -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"