build: adapt merge-junit-results to latest pytest/3 <testsuites> element

This commit is contained in:
Frédéric Péters 2019-10-02 08:15:28 +02:00
parent 487229c96b
commit 325ec83617
1 changed files with 2 additions and 0 deletions

View File

@ -36,6 +36,8 @@ def merge_results(xml_files):
for file_name in xml_files:
tree = ET.parse(file_name)
test_suite = tree.getroot()
if test_suite.tag == 'testsuites':
test_suite = test_suite.getchildren()[0]
failures += int(test_suite.attrib['failures'])
tests += int(test_suite.attrib['tests'])
errors += int(test_suite.attrib['errors'])