Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
tests: Defer writing coverage report.
Steve Howell27b5b0dc267a
diff --git a/tools/test-backend b/tools/test-backendindex 6fa0ca1f28e..c709e23e79c 100755--- a/tools/test-backend+++ b/tools/test-backend@@ -451,10 +451,7 @@ def main() -> None: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:# Assert that various files have full coveragefor path in enforce_fully_covered:@@ -481,13 +478,22 @@ def main() -> None:ok = Falseexcept coverage.misc.NoSource:continue- if not ok:+ if ok:+ print("Coverage checks pass!")+ else:print()print("There are one or more fully covered files that are still in not_yet_fully_covered.")print("Remove the file(s) from not_yet_fully_covered in `tools/test-backend`.")failures = True++ if options.coverage and not options.no_html_report:+ # We do this late, because it can take quite a while.+ 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 options.profile:prof.disable()with tempfile.NamedTemporaryFile(prefix="profile.data.", delete=False) as stats_file: