Skip to content

Become lenient to missing files

Rodrigo Tobar requested to merge lenient-against-missing-files into master

When (unit test and/or linting) JUnit XML files are missing from the filesystem an error different from ValueError is raised by the code, in which case the collect_metrics.py script was aborting without producing a ci-metrics.json file that could be later consumed.

This commit changes the error handling of the count_junit_metrics function to react to any exception type raised by the body of the function, which would include errors raised due to missing files, and more.

I also took the chance of changing the way exception was being logged by switching to the dedicated logger method for these situations.

Signed-off-by: Rodrigo Tobar rtobar@icrar.org

Merge request reports