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

Fix Step Skipping Caused by Using the --exclude Option #115088

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

LuuuXXX
Copy link
Contributor

@LuuuXXX LuuuXXX commented Aug 22, 2023

The original code was overreacting to the --exclude option,

fn maybe_run(&self, builder: &Builder<'_>, pathsets: Vec<PathSet>) {
if pathsets.iter().any(|set| self.is_excluded(builder, set)) {
return;
}

For example:
When x test --exclude alloc or x test --exclude library/alloc is passed, the entire libraray test is skipped.

Related issues:
#112009

@rustbot
Copy link
Collaborator

rustbot commented Aug 22, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @albertlarsan68 (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@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 Aug 22, 2023
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@albertlarsan68 albertlarsan68 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!
Just a little change.

src/bootstrap/builder.rs Outdated Show resolved Hide resolved
src/bootstrap/builder.rs Outdated Show resolved Hide resolved
@albertlarsan68 albertlarsan68 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 Aug 22, 2023
@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@albertlarsan68 albertlarsan68 left a comment

Choose a reason for hiding this comment

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

Another nit, r=me once fixed!

src/bootstrap/builder.rs Outdated Show resolved Hide resolved
@LuuuXXX
Copy link
Contributor Author

LuuuXXX commented Sep 5, 2023

Thanks for the review! I've addressed the phrasing comments
@bors r=albertlarsan68

@bors
Copy link
Contributor

bors commented Sep 5, 2023

@LuuuXXX: 🔑 Insufficient privileges: Not in reviewers

@albertlarsan68
Copy link
Member

Thanks for the PR!
@bors r+

@bors
Copy link
Contributor

bors commented Sep 5, 2023

📌 Commit ab28e3f has been approved by albertlarsan68

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 Sep 5, 2023
@bors
Copy link
Contributor

bors commented Sep 5, 2023

⌛ Testing commit ab28e3f with merge 9fd55f30de49d862e6e89e172babc1ef775dfbd4...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Sep 5, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 5, 2023
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Sep 8, 2023
@LuuuXXX
Copy link
Contributor Author

LuuuXXX commented Sep 8, 2023

When I run the x test --stage 2 --host='--target wasm32-unknown-emscripten library/std command, the following error occurs (same to the error in CI):
test io::copy::tests::io_benches::bench_copy_buf_reader... FAILED
I noticed that wasm32 used --skip library/alloc to temporarily handle this situation when testing library/alloc, so I did the same for library/std.

# Exclude library/alloc due to OOM in benches.
ENV SCRIPT python3 ../x.py test --stage 2 --host='' --target $TARGETS \
--skip library/alloc

Maybe another PR is needed to fix the problem in the wasm32 test.

@LuuuXXX
Copy link
Contributor Author

LuuuXXX commented Sep 8, 2023

@bors r=albertlarsan68

@bors
Copy link
Contributor

bors commented Sep 8, 2023

@LuuuXXX: 🔑 Insufficient privileges: Not in reviewers

Copy link
Member

@albertlarsan68 albertlarsan68 left a comment

Choose a reason for hiding this comment

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

Leave a FIXME for the WASM test

src/ci/docker/host-x86_64/wasm32/Dockerfile Outdated Show resolved Hide resolved
Copy link
Member

@albertlarsan68 albertlarsan68 left a comment

Choose a reason for hiding this comment

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

Can you squash the PR?
r=me once done.

modify fuction clond() -> cloned()

optimize the code

Handle the problem that the pathset is empty and modify the judgment of the builder::tests::test_exclude_kind

Delete unnecessary judegment conditions

skip test for library/std duo to OOM in benches as library/alloc

Add FIXME for WASM32
@LuuuXXX
Copy link
Contributor Author

LuuuXXX commented Sep 8, 2023

@bors r=albertlarsan68

@bors
Copy link
Contributor

bors commented Sep 8, 2023

@LuuuXXX: 🔑 Insufficient privileges: Not in reviewers

@albertlarsan68
Copy link
Member

Thanks for the PR!
@bors r+

@bors
Copy link
Contributor

bors commented Sep 8, 2023

📌 Commit 45abd8c has been approved by albertlarsan68

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-review Status: Awaiting review from the assignee but also interested parties. labels Sep 8, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 8, 2023
…llaumeGomez

Rollup of 6 pull requests

Successful merges:

 - rust-lang#104299 (Clarify stability guarantee for lifetimes in enum discriminants)
 - rust-lang#115088 (Fix Step Skipping Caused by Using the `--exclude` Option)
 - rust-lang#115201 (rustdoc: list matching impls on type aliases)
 - rust-lang#115633 (Lint node for `PRIVATE_BOUNDS`/`PRIVATE_INTERFACES` is the item which names the private type)
 - rust-lang#115638 (`-Cllvm-args` usability improvement)
 - rust-lang#115643 (fix: return early when has tainted in mir-lint)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit dcb4659 into rust-lang:master Sep 8, 2023
11 checks passed
@bors
Copy link
Contributor

bors commented Sep 8, 2023

⌛ Testing commit 45abd8c with merge 309af34...

@rustbot rustbot added this to the 1.74.0 milestone Sep 8, 2023
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Sep 8, 2023
Rollup merge of rust-lang#115088 - LuuuXXX:issue-112009, r=albertlarsan68

Fix Step Skipping Caused by Using the `--exclude` Option

The original code was overreacting to the `--exclude` option,
https://github.com/rust-lang/rust/blob/eadf69a6c6edfe220fc5b1b659e46e271d75a3a1/src/bootstrap/builder.rs#L257-L260
For example:
When `x test --exclude alloc` or `x test --exclude library/alloc` is passed, the entire libraray test is skipped.

Related issues:
rust-lang#112009
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants