@@ -500,10 +500,7 @@ jobs:
500500 coverage :
501501 name : Coverage and Warnings
502502 needs : build
503- # Since the latest Ubuntu image, lcov fails complaining about negative branch counts,
504- # and using fprofile-update=atomic as suggested does not help, so use the previous image
505- # runs-on: ubuntu-latest
506- runs-on : ubuntu-22.04
503+ runs-on : ubuntu-latest
507504 timeout-minutes : 10
508505
509506 steps :
@@ -551,6 +548,10 @@ jobs:
551548 # make -C _build check-code-coverage # <- (ignores errors)
552549 make -C _build check TESTSUITEFLAGS="--jobs=$(($(nproc)+1))"
553550 make -C _build code-coverage-capture \
551+ CODE_COVERAGE_LCOV_SHOPTS_DEFAULT="--rc branch_coverage=1" \
552+ CODE_COVERAGE_LCOV_OPTIONS_DEFAULT="--ignore-errors source --rc geninfo_unexecuted_blocks=1" \
553+ CODE_COVERAGE_LCOV_RMOPTS_DEFAULT="--ignore-errors unused" \
554+ CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT="--rc branch_coverage=1" \
554555 CODE_COVERAGE_DIRECTORY="$(realpath .)/_build"
555556
556557 - name : Upload testsuite.log
@@ -576,7 +577,11 @@ jobs:
576577 - name : Extended coverage
577578 run : |
578579 make -C _build test --jobs=$(($(nproc)+1)) --keep-going
579- make -C _build code-coverage-capture \
580+ make -C _build code-coverage-capture \
581+ CODE_COVERAGE_LCOV_SHOPTS_DEFAULT="--rc branch_coverage=1" \
582+ CODE_COVERAGE_LCOV_OPTIONS_DEFAULT="--ignore-errors source --rc geninfo_unexecuted_blocks=1" \
583+ CODE_COVERAGE_LCOV_RMOPTS_DEFAULT="--ignore-errors unused" \
584+ CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT="--rc branch_coverage=1" \
580585 CODE_COVERAGE_OUTPUT_DIRECTORY=extended-coverage \
581586 CODE_COVERAGE_OUTPUT_FILE=extended-coverage.info \
582587 CODE_COVERAGE_DIRECTORY="$(realpath .)/_build"
0 commit comments