What
Migrate the score/time coverage pipeline from GCC/gcov to LLVM source-based
coverage (llvm-cov) for Linux builds. Keep the gcov pipeline for QNX.
Deliverables:
quality/coverage/coverage.bazelrc — LLVM settings for Linux + gcov for QNX
quality/coverage/llvm_cov/merger.py — per-test profraw→profdata zip generator
quality/coverage/llvm_cov/reporter.py — final HTML + LCOV report generator
quality/coverage/llvm_cov/reporter_wrapper.bzl — Bazel wrapper
.bazelrc — imports quality/coverage/coverage.bazelrc
MODULE.bazel — exposes @llvm_toolchain_llvm for llvm-cxxfilt
.github/workflows/code-coverage.yml — custom workflow using new pipeline
- New
time-x86_64-linux-coverage config for coverage builds (no GCC platform pin)
Why
GCC/gcov instruments at assembly level and generates phantom branches for:
- Exception-unwind edges on every non-
noexcept call (affects ptp headers,
std::make_shared in stub backends)
- GMock internal bookkeeping branches (affects all mock files)
- Assertion-abort branches that are only coverable via subprocess death tests
These phantom branches cause all mock files and ptp headers to show 50% branch
coverage permanently, making the 90% branch coverage goal of #47 unreachable
with gcov.
LLVM source-based coverage tracks source regions, not assembly branches:
- ptp headers: 100% branch (was 50% with gcov) ✅
- GMock mock files: 100% branch (was 50% with gcov) ✅
- No phantom exception-unwind branches ✅
- Baseline: 95.1% line, branch gaps only from untested code paths
References
Acceptance Criteria
What
Migrate the
score/timecoverage pipeline from GCC/gcov to LLVM source-basedcoverage (
llvm-cov) for Linux builds. Keep the gcov pipeline for QNX.Deliverables:
quality/coverage/coverage.bazelrc— LLVM settings for Linux + gcov for QNXquality/coverage/llvm_cov/merger.py— per-test profraw→profdata zip generatorquality/coverage/llvm_cov/reporter.py— final HTML + LCOV report generatorquality/coverage/llvm_cov/reporter_wrapper.bzl— Bazel wrapper.bazelrc— importsquality/coverage/coverage.bazelrcMODULE.bazel— exposes@llvm_toolchain_llvmforllvm-cxxfilt.github/workflows/code-coverage.yml— custom workflow using new pipelinetime-x86_64-linux-coverageconfig for coverage builds (no GCC platform pin)Why
GCC/gcov instruments at assembly level and generates phantom branches for:
noexceptcall (affects ptp headers,std::make_sharedin stub backends)These phantom branches cause all mock files and ptp headers to show 50% branch
coverage permanently, making the 90% branch coverage goal of #47 unreachable
with gcov.
LLVM source-based coverage tracks source regions, not assembly branches:
References
score/time/API #44 (covered: score/time tests)eclipse-score/communicationmodule (quality/coverage/llvm_cov/)Acceptance Criteria
bazel coverage --config=time-x86_64-linux-coverage //score/time/...completes without error
lcov_report/lcov.datis present in the reporter output zip andparseable as LCOV text
code-coverage.ymlruns successfully on Linux x86_64--config=qnxwith the gcov pipelineenable_llvm_coverage_for_death_testsenabled oncescore_cpp_policiesis updated to ≥ 0.0.2 (death-test subprocess coverage)