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

x.py check checks tests/examples/benches #76258

Merged
merged 2 commits into from
Sep 5, 2020

Conversation

Mark-Simulacrum
Copy link
Member

This also adds a check for bootstrap to x.py.

r? @ehuss

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 2, 2020
// than just the leaf crate.
for krate in builder.in_tree_crates("test") {
cargo.arg("-p").arg(krate.name);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This feels rather error-prone and annoying to do, but AFAICT there's no better way to get the behavior we want from Cargo. If we don't do this it'll only test the leaf crate (e.g., rustc-main) which is useless for bootstrap.

--workspace is too broad -- we want something like --dependencies-too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, right. Yea, this is probably the best way to do it. Considering in_tree_crates is used elsewhere, I think it should be relatively reliable for now.

@Mark-Simulacrum
Copy link
Member Author

cc @RalfJung

@jyn514 jyn514 added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Sep 2, 2020
src/bootstrap/check.rs Outdated Show resolved Hide resolved
Often when modifying compiler code you'll miss that you've changed an API used
by unit tests, since x.py check didn't previously catch that.

It's also useful to have this for editing with rust-analyzer and similar tooling
where editing tests previously didn't notify you of errors in test files.
@ehuss
Copy link
Contributor

ehuss commented Sep 4, 2020

👍

@bors r+

@bors
Copy link
Contributor

bors commented Sep 4, 2020

📌 Commit af13338 has been approved by ehuss

@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-review Status: Awaiting review from the assignee but also interested parties. labels Sep 4, 2020
@Mark-Simulacrum
Copy link
Member Author

@ehuss -- any thoughts on #76258 (comment)? I presume there's indeed no better way to get the behavior we want?

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 5, 2020
x.py check checks tests/examples/benches

This also adds a check for bootstrap to x.py.

r? @ehuss
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 5, 2020
Rollup of 11 pull requests

Successful merges:

 - rust-lang#75695 (Add a regression test for issue-72793)
 - rust-lang#75741 (Refactor byteorder to std in rustc_middle)
 - rust-lang#75954 (Unstable Book: add links to tracking issues for FFI features)
 - rust-lang#75994 (`impl Rc::new_cyclic`)
 - rust-lang#76060 (Link vec doc to & reference)
 - rust-lang#76078 (Remove disambiguators from intra doc link text)
 - rust-lang#76082 (Fix intra-doc links on pub re-exports)
 - rust-lang#76254 (Fold length constant in Rvalue::Repeat)
 - rust-lang#76258 (x.py check checks tests/examples/benches)
 - rust-lang#76263 (inliner: Check for codegen fn attributes compatibility)
 - rust-lang#76285 (Move jointness censoring to proc_macro)

Failed merges:

r? @ghost
@bors bors merged commit 45bdee8 into rust-lang:master Sep 5, 2020
@rustbot rustbot added this to the 1.48.0 milestone Sep 5, 2020
@ecstatic-morse
Copy link
Contributor

@Mark-Simulacrum I need a way to disable this, since #76822 has made my normal ./x.py check workflow much more painful. Can we add an opt-out?

@Mark-Simulacrum
Copy link
Member Author

Mark-Simulacrum commented Oct 1, 2020

Yes, we can. I would accept a PR to do so (or even an opt in to match cargo defaults).

I will prepare one myself but probably not until tomorrow at the earliest.

@Mark-Simulacrum Mark-Simulacrum deleted the check-tests branch October 1, 2020 21:16
@RalfJung
Copy link
Member

RalfJung commented Oct 2, 2020

Are you thinking of an opt-out/in via a flag, or via the config file? A flag seems better IMO, this is something that depends on what one is currently working on.

@Mark-Simulacrum
Copy link
Member Author

I plan to add a flag, and pass it on the mingw-check builder (so that we get maximal coverage there).

@Mark-Simulacrum
Copy link
Member Author

Opened #77473.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

None yet

8 participants