-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bootstrap: Consolidate coverage test suite steps into a single step #135097
Conversation
I'm going to reroll because I'm not super sure about the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a nice simplification, thanks.
Something really weird is going on with the --skip
logic though.
In
rust/src/bootstrap/src/core/builder/mod.rs
Line 403 in 089bd51
fn maybe_run(&self, builder: &Builder<'_>, mut pathsets: Vec<PathSet>) { |
On the other hand, the logic in ensure_if_default
skips the step if any of its paths is skipped, which makes much more sense to me.
At the very least, these two skip logics should probably be merged somehow.
In any case, this doesn't seem to make the status quo worse in this regard, as you stated in the PR description. I left two nits, otherwise you can r=me.
089bd51
to
5298f85
Compare
Addressed review feedback (diff). |
Thanks! I'll approve once CI is green. |
@bors r+ |
bootstrap: Consolidate coverage test suite steps into a single step Now that I have more understanding of bootstrap steps, and a renewed distaste for unnecessary macros, I have managed to express the subtleties of the `tests/coverage` test suite in a single step defined in ordinary code, with no need for helper macros. Deciding which modes to run is still a bit clunky due to limitations in existing ShouldRun/PathSet APIs, but I think it's a net improvement over having to declare several different steps to handle the suite path and aliases. The interaction with `--skip` isn't as nice as I'd like, but all of the known limitations are limitations that already existed in the previous implementation. One minor change is that by default compiletest is now invoked in `coverage-run` mode even when cross-compiling. However, in that situation compiletest still knows that it should skip all of the individual coverage-run tests. r? jieyouxu (or reassign)
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#134742 (Use `PostBorrowckAnalysis` in `check_coroutine_obligations`) - rust-lang#134951 (Suppress host effect predicates if underlying trait doesn't hold) - rust-lang#135097 (bootstrap: Consolidate coverage test suite steps into a single step) - rust-lang#135146 (Don't enable anyhow's `backtrace` feature in opt-dist) - rust-lang#135157 (Move the has_errors check in rustdoc back to after TyCtxt is created) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 7 pull requests Successful merges: - rust-lang#134742 (Use `PostBorrowckAnalysis` in `check_coroutine_obligations`) - rust-lang#134771 (Report correct `SelectionError` for `ConstArgHasType` in new solver fulfill) - rust-lang#134951 (Suppress host effect predicates if underlying trait doesn't hold) - rust-lang#135097 (bootstrap: Consolidate coverage test suite steps into a single step) - rust-lang#135146 (Don't enable anyhow's `backtrace` feature in opt-dist) - rust-lang#135153 (chore: remove redundant words in comment) - rust-lang#135157 (Move the has_errors check in rustdoc back to after TyCtxt is created) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#134742 (Use `PostBorrowckAnalysis` in `check_coroutine_obligations`) - rust-lang#134771 (Report correct `SelectionError` for `ConstArgHasType` in new solver fulfill) - rust-lang#134951 (Suppress host effect predicates if underlying trait doesn't hold) - rust-lang#135097 (bootstrap: Consolidate coverage test suite steps into a single step) - rust-lang#135146 (Don't enable anyhow's `backtrace` feature in opt-dist) - rust-lang#135153 (chore: remove redundant words in comment) - rust-lang#135157 (Move the has_errors check in rustdoc back to after TyCtxt is created) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#135097 - Zalathar:coverage-test-step, r=Kobzol bootstrap: Consolidate coverage test suite steps into a single step Now that I have more understanding of bootstrap steps, and a renewed distaste for unnecessary macros, I have managed to express the subtleties of the `tests/coverage` test suite in a single step defined in ordinary code, with no need for helper macros. Deciding which modes to run is still a bit clunky due to limitations in existing ShouldRun/PathSet APIs, but I think it's a net improvement over having to declare several different steps to handle the suite path and aliases. The interaction with `--skip` isn't as nice as I'd like, but all of the known limitations are limitations that already existed in the previous implementation. One minor change is that by default compiletest is now invoked in `coverage-run` mode even when cross-compiling. However, in that situation compiletest still knows that it should skip all of the individual coverage-run tests. r? jieyouxu (or reassign)
Note that a single step can have multiple paths representing different tools/crates, such that the different parts of the step can be run/skipped independently. For example, the bootstrap tools |
Well, I'd probably use separate steps for these things in that case 🤷♂️ It would be easier to reason about if a single step did one thing and all its paths were just aliases for that one thing. But of course this wouldn't really work for granular skipping, like "skip this one UI test from the whole UI tests suite", so it's a no-go. Still, the skip logic at those two places should probably be somehow unified, I guess. |
Now that I have more understanding of bootstrap steps, and a renewed distaste for unnecessary macros, I have managed to express the subtleties of the
tests/coverage
test suite in a single step defined in ordinary code, with no need for helper macros.Deciding which modes to run is still a bit clunky due to limitations in existing ShouldRun/PathSet APIs, but I think it's a net improvement over having to declare several different steps to handle the suite path and aliases.
The interaction with
--skip
isn't as nice as I'd like, but all of the known limitations are limitations that already existed in the previous implementation.One minor change is that by default compiletest is now invoked in
coverage-run
mode even when cross-compiling. However, in that situation compiletest still knows that it should skip all of the individual coverage-run tests.r? jieyouxu (or reassign)