Code coverage pipeline for Eclipse S-CORE, LLVM source-based on Linux and
gcov-based for QNX on-target tests: one
bazel coverage run gives one line and branch coverage report for C++ and
Rust, untested in-scope files at exact 0 %, reviewed justifications with an
effective-coverage metric, and a CI threshold gate.
The tool is developed as a software tool under the S-CORE tool-management
process (ISO 26262-8 clause 11). It is the successor of
@score_tooling//coverage.
The documentation is docs-as-code under docs/ and published at
https://eclipse-score.github.io/coverage_tool:
- User manual — adoption guide (six steps), command reference, constraints of use and known problems.
- Requirements — use cases, potential errors (HazOp style) and the tool requirements the tests verify.
- Architecture — the two-phase pipeline and the module/consumer split.
- Verification report — test inventory, structural coverage of the tool, static analysis, end-to-end validation, deviations.
Build it locally with bazel run //docs:docs (output in docs/_build/) or
bazel run //docs:live_preview.
bazel coverage --config=llvm_cov //... --build_tests_only
bazel run @score_coverage//:generate_coverage_html -- \
--yaml tools/coverage/coverage_justifications.yaml --archive-dir coverage_artifactExit codes: 0 gate passed, 1 gate failed, 2 no verdict possible.
defs.bzl,BUILD— the public API (score_coverage_scope,score_coverage_reporter,//:merger,//:generate_coverage_html,//:enable_llvm_coverage_for_death_tests). The root package loads only runtime dependencies so it stays loadable for consumers.score_coverage/— implementation (Python report tooling and Starlark rules).tests/— unit tests inunit/for the Python implementation, repository tools and Starlark rules (Bazel analysis tests), end-to-end pipeline tests against the C++ + Rust consumer fixture inend_to_end/, and compatibility tests against real consumer projects incompatibility/.tools/— the self-coverage gate.docs/— the docs-as-code tree.
The pre-commit hooks use Python 3.12.
bazel test //tests/unit/... //tests/end_to_end/test_framework/... //tools/... # unit, test-framework + analysis tests
bazel coverage --combined_report=lcov //tests/unit/score_coverage:all
bazel run //tools:self_coverage_gate -- --min-lines 95 --min-branches 87
bazel test //tests/end_to_end/tests:all # LLVM and gcov end-to-end cases
pre-commit run --all-files # includes Ruff, Pylint and tyThe end-to-end commands use the checked-in consumer workspace and reuse its
Bazel output base, including extracted toolchains. This output base is separate
from the main repository's, so nested Bazel commands do not wait on the outer
test's lock. Run both backends in one Bazel invocation so the exclusive gcov
target runs separately from LLVM. The LLVM coverage archive is available in
the blackbox_test/test.outputs directory under bazel-testlogs/tests/end_to_end/tests/.
Compatibility tests run coverage against baselibs, lifecycle, logging and persistency.
Select one with
bazel test //tests/compatibility:consumers --test_arg=-k --test_arg=logging.
Each CI job retains its consumer's command logs, status summary and coverage report.
The tests follow current consumer branches; testing pinned revisions is tracked in
#42.