Skip to content
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

Add --no-capture/--nocapture as bootstrap arguments #134809

Merged
merged 3 commits into from
Dec 27, 2024

Conversation

clubby789
Copy link
Contributor

I often try x test ... --nocapture => 'unknown argument' => x test ... -- --nocapture. As we forward several other compiletest flags, let's recognise this one in bootstrap as well.

@rustbot
Copy link
Collaborator

rustbot commented Dec 26, 2024

r? @albertlarsan68

rustbot has assigned @albertlarsan68.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Dec 26, 2024
@rustbot
Copy link
Collaborator

rustbot commented Dec 26, 2024

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I contend that we should only support the sane --no-capture flag that follows common CLI conventions, and not support the current libtest --nocapture naming. The changes themselves look reasonable otherwise.

src/bootstrap/src/core/config/flags.rs Outdated Show resolved Hide resolved
src/bootstrap/src/core/build_steps/test.rs Outdated Show resolved Hide resolved
@jieyouxu jieyouxu assigned jieyouxu and unassigned albertlarsan68 Dec 27, 2024
@jieyouxu jieyouxu added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 27, 2024
@clubby789
Copy link
Contributor Author

The thought was that while we're transitioning it would be nice to support both. But I suppose we shouldn't be introducing new uses of the 'bad' version. Will remove

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc labels Dec 27, 2024
@rustbot
Copy link
Collaborator

rustbot commented Dec 27, 2024

Some changes occurred in src/tools/compiletest

cc @jieyouxu

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things:

  1. Can you also add a change tracker entry, since this is adding a new bootstrap cli flag?
  2. Could you also slightly update rustc-dev-guide so people can find out that this is a thing now?

Otherwise, this is a very nice testing UX improvement. Thanks!

src/bootstrap/src/core/config/flags.rs Show resolved Hide resolved
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this LGTM. Please r=me after PR CI is green.

@clubby789
Copy link
Contributor Author

@bors r=jieyouxu

@bors
Copy link
Contributor

bors commented Dec 27, 2024

📌 Commit 35bbb01 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 27, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 27, 2024
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#133663 (Add a compiler intrinsic to back `bigint_helper_methods`)
 - rust-lang#134798 (Make `ty::Error` implement all auto traits)
 - rust-lang#134808 (compiletest: Remove empty 'expected' files when blessing)
 - rust-lang#134809 (Add `--no-capture`/`--nocapture` as bootstrap arguments)
 - rust-lang#134826 (Add spastorino to users_on_vacation)
 - rust-lang#134828 (Add clubby789 back to bootstrap review rotation)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 5b249f8 into rust-lang:master Dec 27, 2024
6 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 27, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 27, 2024
Rollup merge of rust-lang#134809 - clubby789:nocapture, r=jieyouxu

Add `--no-capture`/`--nocapture` as bootstrap arguments

I often try `x test ... --nocapture` => 'unknown argument' => `x test ... -- --nocapture`. As we forward several other compiletest flags, let's recognise this one in bootstrap as well.
poliorcetics pushed a commit to poliorcetics/rust that referenced this pull request Dec 28, 2024
Add `--no-capture`/`--nocapture` as bootstrap arguments

I often try `x test ... --nocapture` => 'unknown argument' => `x test ... -- --nocapture`. As we forward several other compiletest flags, let's recognise this one in bootstrap as well.
poliorcetics pushed a commit to poliorcetics/rust that referenced this pull request Dec 28, 2024
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#133663 (Add a compiler intrinsic to back `bigint_helper_methods`)
 - rust-lang#134798 (Make `ty::Error` implement all auto traits)
 - rust-lang#134808 (compiletest: Remove empty 'expected' files when blessing)
 - rust-lang#134809 (Add `--no-capture`/`--nocapture` as bootstrap arguments)
 - rust-lang#134826 (Add spastorino to users_on_vacation)
 - rust-lang#134828 (Add clubby789 back to bootstrap review rotation)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants