bootstrap: Allow path-based skipping of the coverage test suite#159131
Open
Zalathar wants to merge 3 commits into
Open
bootstrap: Allow path-based skipping of the coverage test suite#159131Zalathar wants to merge 3 commits into
Zalathar wants to merge 3 commits into
Conversation
When bootstrap runs a step by default, without explicit paths, it will normally act as though the user had explicitly requested all of the paths and aliases that the step registered through `ShouldRun`. For the coverage test suite, that gives the wrong outcome. Running a command like `./x test --skip=tests` or `./x test --skip=coverage` should skip the coverage tests, but instead the coverage tests would run anyway, due to the `coverage-map` and `coverage-run` aliases being treated as implied command-line arguments. This commit fixes that problem by adding a special flag to `ShouldRun`. When creating pathsets for a step that is being run by default, if the step has set the `default_to_suites_only` flag, all non-suite pathsets are discarded. That gives the desired behavior for skipping coverage tests, without affecting other steps, since other steps don't set the flag.
Member
Author
|
Running a few try jobs to double-check that coverage jobs are still skipped in the appropriate CI jobs: @bors try jobs=x86_64-msvc-2,x86_64-gnu-llvm-22-1 |
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 11, 2026
bootstrap: Allow path-based skipping of the coverage test suite try-job: x86_64-msvc-2 try-job: x86_64-gnu-llvm-22-1
Contributor
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.
When bootstrap runs a step by default, without explicit paths, it will normally act as though the user had explicitly requested all of the paths and aliases that the step registered through
ShouldRun.For the coverage test suite, that gives the wrong outcome. Running a command like
./x test --skip=testsor./x test --skip=coverageshould skip the coverage tests, but instead the coverage tests would run anyway, due to thecoverage-mapandcoverage-runaliases being treated as implied command-line arguments.This commit fixes that problem by adding a special flag to
ShouldRun. When creating pathsets for a step that is being run by default, if the step has set thedefault_to_suites_onlyflag, all non-suite pathsets are discarded. That gives the desired behaviour for skipping coverage tests, without affecting other steps, since other steps don't set the flag.The end result is that
./x test --skip=testsshould now skip the coverage tests, as intended. This lets us remove some--skiparguments from CI scripts, which were only required by the previous incorrect behaviour.The
default_to_suites_onlyflag is a bit of a hack, but to me it seems like the cleanest way to resolve this problem without having to completely overhaul how CLI paths work, which is a much bigger task. And I think being able to remove the weird extra--skiparguments from CI scripts makes this a net positive.r? jieyouxu