INNER CODE UNIT · Python
main
apache/ozone · dev-support/ci/junit_summary.py:166
def main(argv=None):
parser = argparse.ArgumentParser(description="Print a Markdown summary of JUnit XML test reports.")
parser.add_argument("--path", default=".", help="directory to scan for TEST-*.xml reports")
try:
args = parser.parse_args(argv)
except SystemExit:
return 0
# This script only decorates the step summary; it must NEVER fail the check, so exit 0 no matter what.
try:
cases = []
for report in find_reports(args.path):
try:
cases.extend(parse_report(report))
except Exception as e:
print("Skipping unreadable report %s: %s" % (report, e), file=sys.stderr)
if cases:
print(render_summary(cases), end="")
except Exception as e: