Skip to content

Commit 8db55fe

Browse files
committed
Work around gcov negative hit count bug in coverage report
gcov can produce negative branch hit values (gcc bug #68080). Newer gcovr versions treat this as a fatal error. Adding --gcov-ignore-parse-errors=negative_hits.warn_once_per_file lets the coverage report complete while still logging the issue.
1 parent 27f1be3 commit 8db55fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/verify-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ jobs:
742742
- name: Generate coverage report
743743
run: |
744744
cd build
745-
gcovr --root .. --filter '../src/' --xml coverage.xml --xml-pretty --print-summary
745+
gcovr --root .. --filter '../src/' --xml coverage.xml --xml-pretty --print-summary --gcov-ignore-parse-errors=negative_hits.warn_once_per_file
746746
if: ${{ matrix.os-type == 'ubuntu' && matrix.c-compiler == 'gcc' && matrix.debug == 'debug' && matrix.coverage == 'coverage' && success() }}
747747

748748
- name: Upload coverage to Codecov

0 commit comments

Comments
 (0)