Skip to content

Commit b439c1d

Browse files
committed
Fix coverage for recent lcov (>= 2)
1 parent d3a3a3e commit b439c1d

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/build_nightly.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)