Repository navigation
scope: build the coverage scope in the tests' configuration (QNX baseline) - #68
Draft
LittleHuba wants to merge 1 commit into
Draft
LittleHuba wants to merge 1 commit into
LittleHuba wants to merge 1 commit into
Conversation
Bazel analyses --coverage_report_generator, and with it a scope it depends on, in the exec configuration. Every select() on the platform then resolved for the host, so a QNX run listed the Linux variants of platform-specific code at 0 % and missed the QNX variants. The scope is now an ordinary target built in the same invocation as the tests, so it is analysed for the platform they run on. The reporter reads the outputs from the bin directory of that configuration (scope_root) instead of its own runfiles. The platform attribute and the transition are removed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Ulrich Huber <ulrich.uh.huber@bmw.de>
LittleHuba
force-pushed
the
qnx_baseline_target_platform
branch
from
November 16, 2026 16:43
04652ee to
7ff03b4
Compare
This branch has not been deployed
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.
Problem
Bazel analyses
--coverage_report_generatorin the exec configuration. A scope the reporter depends on is analysed there too, so everyselect()on the platform resolves for the host. On a QNX run the 0 % baseline listed Linux-only files and missed QNX-only ones (see #23).Change
coverage_scopeis an ordinary target, built in the samebazel coverageinvocation as the tests, so it is analysed for the tests' platform. Theplatformattribute and the transition are removed.score_coverage_reportertakes the scope label as a string rather than a dependency..gcnofiles and sources from the bin directory of that configuration (scope_root) instead of their runfiles.DefaultInfo.Usage
bazel coverage --config=qnx <tests> //path:coverage_scope.--build_tests_onlyskips the scope and must not be used.Testing
//tests/unit/score_coverage/...: pass locally.//tests/unit/starlark/...) could not run locally (no C++ compiler); they need CI.