mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-08-02 01:26:21 +00:00
ci: add branch coverage to lcov
Enable branch coverage with --rc lcov_branch_coverage=1. This provides more detailed coverage metrics: - Line coverage: % of code lines executed - Function coverage: % of functions called - Branch coverage: % of if/else/switch branches taken Branch coverage is a step towards MC/DC (Modified Condition/Decision Coverage) used in safety-critical systems. Also add coverage/ to .gitignore.
This commit is contained in:
5
.github/workflows/ci-code.yml
vendored
5
.github/workflows/ci-code.yml
vendored
@@ -113,10 +113,13 @@ jobs:
|
|||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
make check || true
|
make check || true
|
||||||
make check-functional-parallel || true
|
make check-functional-parallel || true
|
||||||
lcov --capture --directory . --output-file /coverage/coverage.info --ignore-errors inconsistent
|
lcov --capture --directory . --output-file /coverage/coverage.info \
|
||||||
|
--rc lcov_branch_coverage=1 \
|
||||||
|
--ignore-errors inconsistent
|
||||||
lcov --remove /coverage/coverage.info \
|
lcov --remove /coverage/coverage.info \
|
||||||
"/usr/include/*" "*/tests/*" \
|
"/usr/include/*" "*/tests/*" \
|
||||||
--output-file /coverage/coverage.info \
|
--output-file /coverage/coverage.info \
|
||||||
|
--rc lcov_branch_coverage=1 \
|
||||||
--ignore-errors inconsistent,empty,unused
|
--ignore-errors inconsistent,empty,unused
|
||||||
'
|
'
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -107,3 +107,4 @@ breaks
|
|||||||
*.tar.*
|
*.tar.*
|
||||||
*.zip
|
*.zip
|
||||||
*.log*
|
*.log*
|
||||||
|
coverage/
|
||||||
|
|||||||
Reference in New Issue
Block a user