Skip to content

Commit

Permalink
report: fix bug for coverage links (#651)
Browse files Browse the repository at this point in the history
Introduced following the addition of textcov to the workdir in
#638

This caused reports to individual benchmarks run to have wrong links,
e.g.

https://llm-exp.oss-fuzz.com/Result-reports/ofg-pr/2024-09-21-638-d-cov-21-minor-for-ci/benchmark/output-htslib-bcf_index_build/index.html

---------

Signed-off-by: David Korczynski <[email protected]>
  • Loading branch information
DavidKorczynski authored Sep 25, 2024
1 parent b6fd6c1 commit 43bf4db
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion report/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,13 @@ def _copy_and_set_coverage_report(self, benchmark, sample):
for l in os.listdir(coverage_path):
if l.split('.')[0] == sample.id:
coverage_report = os.path.join(coverage_path, l)

# On cloud runs there are two folders in code coverage reports, (report,
# textcov). If we have three files/dirs (linux, style.cssand textcov), then
# it's a local run. In that case copy over the code coverage reports so
# they are visible in the HTML page.
if coverage_report and os.path.isdir(coverage_report) and len(
os.listdir(coverage_report)) > 1:
os.listdir(coverage_report)) > 2:
# Copy coverage to reports out
dst = os.path.join(self._output_dir, 'sample', benchmark.id, 'coverage')
os.makedirs(dst, exist_ok=True)
Expand Down

0 comments on commit 43bf4db

Please sign in to comment.