test-backend: Improve performance by disabling XML report.

We don't use the XML report ourselves. We add options to make this
easy to control if specific circumstances indicate doing so.
This commit is contained in:
Adam Sah 2022-05-14 20:52:31 +00:00 committed by Tim Abbott
parent 492272d597
commit 534754442a
1 changed files with 14 additions and 3 deletions

View File

@ -232,6 +232,12 @@ def main() -> None:
parser.add_argument(
"--verbose-coverage", action="store_true", help="Enable verbose print of coverage report."
)
parser.add_argument(
"--xml-report", action="store_true", help="Enable (slow) XML coverage report."
)
parser.add_argument(
"--no-html-report", action="store_true", help="Disable (slow) HTML coverage report."
)
parser.add_argument(
"--no-cov-cleanup", action="store_true", help="Do not clean generated coverage files."
)
@ -441,7 +447,12 @@ def main() -> None:
if options.verbose_coverage:
print("Printing coverage data")
cov.report(show_missing=False)
if options.xml_report:
print("Writing XML report")
cov.xml_report(outfile="var/coverage.xml")
print("XML report saved; see var/coverage.xml")
if not options.no_html_report:
print("Writing HTML report")
cov.html_report(directory="var/coverage", show_contexts=True)
print("HTML report saved; visit at http://127.0.0.1:9991/coverage/index.html")
if full_suite and not failures and options.coverage: