Adjust script to handle XML files

This commit is contained in:
Michael Kaye 2022-02-24 16:36:43 +00:00
parent 70c9418a5e
commit 9ddcaffebf
1 changed files with 3 additions and 4 deletions

View File

@ -15,9 +15,8 @@ for xmlfile in xmlfiles:
root = tree.getroot() root = tree.getroot()
name = root.attrib['name'] name = root.attrib['name']
name = root.attrib['time'] time = root.attrib['time']
tests = int(root.attrib['tests']) tests = int(root.attrib['tests'])
passed = int(root.attrib['passed'])
skipped = int(root.attrib['skipped']) skipped = int(root.attrib['skipped'])
errors = int(root.attrib['errors']) errors = int(root.attrib['errors'])
failures = int(root.attrib['failures']) failures = int(root.attrib['failures'])
@ -37,7 +36,7 @@ for xmlfile in xmlfiles:
else: else:
print(f"::error file={testname}::{message} in {time}s") print(f"::error file={testname}::{message} in {time}s")
print(child.text) print(child.text)
body = f"passed={passed} failures={failures} errors={errors} skipped={skipped}" body = f"passed={success} failures={failures} errors={errors} skipped={skipped}"
print(f"::set-output name={suitename}::passed={body}") print(f"::set-output name={suitename}::={body}")
print("::endgroup::") print("::endgroup::")