coverage: adopt the LLVM coverage pipeline from score_tooling 2.2.0 - #282
Merged
Conversation
dcalavrezo-qorix
requested a deployment
to
workflow-approval
August 27, 2026 12:13 — with
GitHub Actions
Waiting
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
dcalavrezo-qorix
requested a deployment
to
workflow-approval
August 27, 2026 12:49 — with
GitHub Actions
Waiting
dcalavrezo-qorix
marked this pull request as ready for review
August 27, 2026 15:13
dcalavrezo-qorix
requested review from
4og,
antonkri,
arsibo,
pawelrutkaq and
rmaddikery
as code owners
August 27, 2026 15:13
rmaddikery
reviewed
Aug 27, 2026
rmaddikery
reviewed
Aug 27, 2026
Replace the gcov-based cpp-coverage reusable with the shared LLVM source-based coverage pipeline (@score_tooling//coverage), covering C++ AND Rust in one report: - quality/coverage/: score_coverage_scope over the module's components (//score/mw/log:log facade incl. the backends it wires, backend:custom, the Rust bridge crate + its C++ init library, the datarouter daemon — the same scope the old instrumentation filter expressed; backend:slog is QNX-only and cannot be measured on the Linux host), score_coverage_reporter, and the llvm_cov bazelrc config. The config registers the Ferrocene toolchain explicitly (regular builds only do so inside --config=x86_64-linux) and excludes integration/manual tests. Untested in-scope files appear at exact 0% via the --empty-profile baseline. Known gap: cc_binary entry-point sources are not collected (no CcInfo); documented in the BUILD comment. - MODULE.bazel: score_tooling 1.2.0 (pinned 1.1.2) -> 2.2.0; score_toolchains_rust 0.8.0 -> 0.10.0 (its standard toolchains ship llvm-cov/llvm-profdata, which enables Rust coverage; same rustc rev); toolchains_llvm 1.7.0 -> 1.8.0 with a second, coverage-only 22.1.7 instance (19.1.7 stays for clang-tidy); trlc override -> trlc-3.0.1 (score_tooling >= 2.x loads trlc 3.x symbols). - Root BUILD: use_format_targets loads from @score_tooling//third_party/format:macros.bzl (moved out of defs.bzl). - .bazelrc: legacy gcov coverage flags removed; llvm_cov config imported. - coverage_report.yml: workflow_call + approval gate kept; the inner reusable is replaced by the inline job. Artifact name logging_cpp_coverage kept (docs.yml downloads it). Report-only threshold, as before. The markdown job summary appears on the run page via GITHUB_STEP_SUMMARY. Validated: 37/37 tests under --config=llvm_cov (2 skipped by tag), raw line coverage 85.77% (5750/6704), branches 79.10%, 99 in-scope files incl. the Rust crate, 2 at exact 0%.
- cr_checker now collects files via git pathspecs: the //:-label style srcs of the copyright target become plain paths. - 53 pre-existing docs/.puml/PR-template files the previously pinned checker never scanned receive their Apache-2.0 headers (copyright.fix); 3 pre-existing duplicated headers in score/test/component/*/BUILD are deduplicated. - score_tooling 2.x tags its format tests manual, which this repo's default test filter hides (bazel test //:format.check found no tests); format.yml lifts the filter.
Three CI failures unrelated to coverage, all triggered by the dependency bumps of the previous commits: - clang-tidy: toolchains_llvm >= 1.8.0 emits -stdlib=libc++ together with -nostdinc++ (explicit libc++ include paths); clang reports -stdlib as unused and the warnings_as_errors feature makes that fatal. The tidy config now passes -Wno-unused-command-line-argument; analysis output is unchanged (verified on the failing target). - QNX integration tests: rules_android is now pulled in transitively (lobster -> rules_jvm_external -> rules_android) and its SDK repository extension fails on runners without Android SDK APIs. Unset ANDROID_HOME via --repo_env (same fix as eclipse-score/time). - Component tests: the persisted output-base cache restored a stale external trlc repository (pre-3.x) via restore-keys; bump the cache key version so the job starts from a clean output base.
output_user_root is not a 'bazel info' key in Bazel 8.6.0 (the version pinned in .bazelversion), so the path-discovery step failed with 'unknown key(s)' on every run; the BAZEL_USER_ROOT variable it set was never used.
score_tooling 2.x runs the PlantUML parser on every diagram referenced by architectural_design(). The legacy diagrams under score/mw/log/design/backend use constructs outside the parser's supported subset (hide empty members, !theme, state transitions, multi-line notes), so every wildcard build (//..., //score/...) failed on this target. Nothing depends on the target - the docs include the .puml files directly - so exclude it from wildcard builds until the diagrams are reworked. Tracked in eclipse-score/tooling#447.
rmaddikery
force-pushed
the
dcalavrezo_llvm_coverage
branch
from
August 27, 2026 15:51
3006d18 to
de54ed4
Compare
rmaddikery
requested a deployment
to
workflow-approval
August 27, 2026 15:51 — with
GitHub Actions
Waiting
rmaddikery
reviewed
Aug 27, 2026
rmaddikery
approved these changes
Aug 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adopt the unified LLVM source-based coverage pipeline from
score_tooling2.2.0 (@score_tooling//coverage), replacing the gcov-basedcpp-coveragereusable. Same migration as eclipse-score/persistency#380, eclipse-score/time#186 and qorix_middleware.--empty-profilebaseline (2 surfaced immediately, incl. the 30-linescore_log_bridge_init.cpp).GITHUB_STEP_SUMMARY, score_tooling 2.2.0): overall/per-directory tables, least-covered and 0% file lists.COVERAGE_THRESHOLD: "0") — the previous workflow had no gate either; ratchet upward as tests/justifications land.Changes
quality/coverage/:score_coverage_scopeover the module's components —//score/mw/log:log(facade, pulls in the backends it wires),backend:custom, the Rust bridge crate + its C++ init library, and thedatarouterdaemon (walks its application libraries). Same scope the old--instrumentation_filterexpressed.backend:slogis QNX-only and cannot be measured on the Linux host (on-target coverage: coverage: on-target (QNX) coverage support in the shared coverage module tooling#427). Plusscore_coverage_reporterand thellvm_covbazelrc config (registers the Ferrocene toolchain explicitly, since regular builds only register it inside--config=x86_64-linux; excludesintegration/manualtests).MODULE.bazel: score_tooling 1.2.0 (pinned to 1.1.2) → 2.2.0; score_toolchains_rust 0.8.0 → 0.10.0 (its standard Ferrocene toolchains ship llvm-cov/llvm-profdata — that is what enables Rust coverage; same rustc revision as before);toolchains_llvm1.7.0 → 1.8.0 with a second, coverage-only 22.1.7 instance (the 19.1.7 clang-tidy instance is untouched); trlc override → trlc-3.0.1 (score_tooling ≥ 2.x loads trlc 3.x symbols; a git_override pins graph-wide).BUILD:use_format_targetsnow loaded from@score_tooling//third_party/format:macros.bzl(moved out ofdefs.bzlin 2.x)..bazelrc: legacy gcovcoverageflags removed;llvm_covconfig imported.coverage_report.yml: stillworkflow_callwith the approval gate (docs.yml consumes it), inner reusable replaced by the inline job; artifact namelogging_cpp_coveragekept sincedocs.ymldownloads it astests-report-artifact.format.yml: score_tooling 2.x tags its format testsmanual, which this repo's defaulttest --test_tag_filters=-manualhides (bazel test //:format.checkwould find no tests) — the workflow now lifts the filter.//:-label style to plain paths (the checker collects via git pathspecs now), Apache headers added to 53 docs/.puml/template files it now scans, and 3 pre-existing duplicated headers inscore/test/component/*/BUILDdeduplicated.Known gap (documented in quality/coverage/BUILD)
cc_binaryentry-point sources (dataroutermain) are not collected by the scope aspect (noCcInfo); tracked as a scope-aspect enhancement in score_tooling.Validation (local)
QNX flows untouched.
score_tooling 2.x side effects fixed on this branch (third commit)
The first CI run failed in several jobs; only the sanitizer/QNX-build/main-build failures are the PlantUML blocker above. The others were distinct 2.x-bump side effects, now fixed:
-stdlib=libc+++-nostdinc++; clang reports-stdlibunused → fatal underwarnings_as_errors. Tidy config suppresses-Wunused-command-line-argument(analysis unchanged; verified locally on the failing target).rules_android's SDK extension now gets fetched transitively (lobster → rules_jvm_external → rules_android) and fails on GitHub runners →common --repo_env=ANDROID_HOME=(same as eclipse-score/time).trlcrepo viarestore-keys→ cache key bumped.bazel info output_user_rootis not a valid key in Bazel 8.6.0 (.bazelversion), so the workflow's path-discovery step failed on every run; the variable was unused → line removed.