Skip to content

Migrate coverage pipeline to score_coverage 0.3.1 - #715

Open
dcalavrezo-qorix wants to merge 4 commits into
mainfrom
dcalavrezo_score_coverage
Open

dcalavrezo-qorix wants to merge 4 commits into
mainfrom
dcalavrezo_score_coverage

Conversation

@dcalavrezo-qorix

@dcalavrezo-qorix dcalavrezo-qorix commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Rollout of the qualified S-CORE coverage tool, score_coverage 0.3.1 (release notes), tracked in eclipse-score/score#3258. Linux LLVM coverage only; QNX on-target coverage is not part of this PR.

What

The coverage pipeline this repository used from @score_tooling//coverage moved to its own module. This PR switches the labels one-to-one (defs.bzl, merger, generate_coverage_html, the death-test feature) and adds score_coverage 0.3.0 as a dev dependency. rules_rust is already at the required 0.68.2-score. Scope (quality/coverage/BUILD), the coverage:llvm_cov config, the justification file and the workflow are otherwise unchanged; the README points at the tool's user manual.

Verification

Local, bazel coverage --config=llvm_cov //score/... --build_tests_only (37 tests), old pipeline vs this branch, LCOV compared record by record:

Check Result
Files in report 77 → 147 (70 added, see below)
Covered/uncovered status of the 77 common files identical for 75; 2 explained below
Raw line coverage 77.29 % → 78.35 %
Raw branch coverage 65.70 % → 67.40 %
HTML index 147 links, 0 dead, one row per file
Second run with the new module identical status in every file
bazel build --nobuild --lockfile_mode=error --config=x86_64-linux //... pass

Added files. 12 .h and 58 .hpp headers of health_monitor and launch_manager. The old pipeline dropped headers reached through include directories (eclipse-score/coverage_tool#5, fixed in 0.2.0); they are now measured. Most of them are well covered, which is why both percentages go up. 5 of the 70 are at 0 %.

Status differences.

  • process_group_manager/details/process_info_node.hpp lines 61–72: the member-initializer lines of the move constructor are now reported (all covered); the old report showed only the braces of that constructor.
  • osal/details/posix/semaphore.cpp line 100: the baseline run recorded 528 calls to wait() of which one sem_wait failed, the new runs 527 calls with none failing. A timing effect of the concurrency tests, not the tool.

New in the archive. unmapped_files.txt lists in-scope files that have no coverage data at all: 18 declaration-only headers and 33 no-data files. The no-data list includes Rust sources of health_monitor (lib.rs, the mod.rs files, log.rs, protected_memory.rs, supervisor_api_client) and launch_manager/src/alive/src/rust/src/lib.rs. None of these had coverage data before either; they were simply not listed. Worth a look by the module owners.

Update: bumped to 0.3.1, which requires the explicit --instrumentation_filter=^//score[/:] this branch sets. Bazel guesses the filter from the packages of the test targets; libraries tested from a test subpackage were otherwise compiled without counters or, on QNX, lost their counters (score/os showed 13 % instead of 80 % in the first QNX report). See the 0.3.1 release notes.

The LLVM coverage pipeline under @score_tooling//coverage moved to its
own qualified module, score_coverage (eclipse-score/coverage_tool,
TCL LOW). Switch the labels one-to-one and add the module as a dev
dependency; rules_rust is already at 0.68.2-score. Scope, config,
justification file and workflow are otherwise unchanged.

Local comparison, //score/... (37 tests), old pipeline vs this commit,
LCOV compared record by record:

  files in report        77 -> 147 (70 headers added, see below)
  identical status       75 of 77 common files
  raw line coverage      77.29 % -> 78.35 %
  raw branch coverage    65.70 % -> 67.40 %

The 70 added files are .h/.hpp headers of health_monitor and
launch_manager that the old pipeline dropped (headers reached through
include directories); each has one row in the HTML index and its link
resolves. Of the two status differences, process_info_node.hpp gains
the member-initializer lines of the move constructor (all covered;
the old report showed only the braces), and semaphore.cpp lost the
"sem_wait failed" branch arm: the baseline run had one more wait()
call that failed, a timing effect of the concurrency tests. A second
run with the new module reproduced the first one exactly.

Tracking: eclipse-score/score#3258
Signed-off-by: Dan Calavrezo <195309321+dcalavrezo-qorix@users.noreply.github.com>
Bazel guesses --instrumentation_filter from the packages of the test
targets and strips only a trailing /tests; a library tested from a test/
subpackage is compiled without counters unless one of its deps is
instrumented. Name the whole module, as the score_coverage manual now
requires (0.3.1).

Signed-off-by: Dan Calavrezo <195309321+dcalavrezo-qorix@users.noreply.github.com>
0.3.1 requires the explicit --instrumentation_filter this branch already
sets, and warns when a report shows the pattern of a library tested from
a test/ subpackage without data.

Signed-off-by: Dan Calavrezo <195309321+dcalavrezo-qorix@users.noreply.github.com>
@dcalavrezo-qorix dcalavrezo-qorix changed the title Migrate coverage pipeline to score_coverage 0.3.0 Migrate coverage pipeline to score_coverage 0.3.1 Sep 29, 2026
Signed-off-by: Dan Calavrezo <195309321+dcalavrezo-qorix@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant