Don't fail when combining coverage files

This commit is contained in:
Pedro Algarvio 2019-07-11 17:09:24 +01:00
parent 61e9efd7e0
commit b459a482a0
No known key found for this signature in database
GPG key ID: BB36BF6584A298FF

View file

@ -292,7 +292,12 @@ def _run_with_coverage(session, *test_cmd):
)
finally:
# Always combine and generate the XML coverage report
session.run('coverage', 'combine')
try:
session.run('coverage', 'combine')
except CommandFailed:
# Sometimes some of the coverage files are corrupt which would trigger a CommandFailed
# exception
pass
session.run('coverage', 'xml', '-o', os.path.join(REPO_ROOT, 'artifacts', 'coverage', 'coverage.xml'))