Tools: support reference data in coverage report

This adds initial support for showing the difference between old and new coverage
data. The difference is only shown in index.html currently. This is mainly useful
when adding new tests right now, to see the impact.

To use this, rename the `coverage/analysis` folder in the build directory to
`reference`. It will automatically be used by the report script if that reference
folder exists.
This commit is contained in:
Jacques Lucke
2024-08-17 13:36:42 +02:00
parent 2c52852116
commit cc01e8a74e
3 changed files with 93 additions and 32 deletions

View File

@@ -62,10 +62,11 @@ def run_report(argv):
coverage_dir = build_dir / "coverage"
analysis_dir = coverage_dir / "analysis"
reference_dir = coverage_dir / "reference"
report_dir = coverage_dir / "report"
parse(build_dir, analysis_dir)
report_as_html(analysis_dir, report_dir)
report_as_html(analysis_dir, report_dir, reference_dir=reference_dir)
if not args.no_browser:
webbrowser.open("file://" + str(report_dir / "index.html"))