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

Builder: Warn if test file does not exist #80627

Merged
merged 1 commit into from
Jan 5, 2021
Merged

Conversation

bugadani
Copy link
Contributor

@bugadani bugadani commented Jan 2, 2021

Running ./x.py test with a file that does not exists (but where the path belongs to a test suite) silently ignores the missing file and runs the whole test suite. This PR prints a warning to reduce the potential surprise factor.

Closes #80621

@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 2, 2021
if !exists {
if let Some(p) = p.to_str() {
builder.info(&format!(
"Warning: Skipping \"{}\": file or directory does not exist",
Copy link
Member

Choose a reason for hiding this comment

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

Hm, it looks like a path can reference something that's not a file or a directory (e.g. broken symlink) - maybe we should say something like "is not a regular file or director" here instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds fair, updated

@Mark-Simulacrum Mark-Simulacrum 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 Jan 4, 2021
@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
extracting /checkout/obj/build/cache/2020-11-19/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz
error: failed to read `/checkout/src/tools/cargo/crates/credential/cargo-credential-1password/Cargo.toml`

Caused by:
  No such file or directory (os error 2)
Build completed unsuccessfully in 0:00:20

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 4, 2021
@Mark-Simulacrum
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 4, 2021

📌 Commit 6002e78 has been approved by Mark-Simulacrum

@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 Jan 4, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 5, 2021
Rollup of 12 pull requests

Successful merges:

 - rust-lang#80442 (Mention Arc::make_mut and Rc::make_mut in the documentation of Cow)
 - rust-lang#80533 (bootstrap: clippy fixes)
 - rust-lang#80538 (Add check for `[T;N]`/`usize` mismatch in astconv)
 - rust-lang#80612 (Remove reverted change from relnotes)
 - rust-lang#80627 (Builder: Warn if test file does not exist)
 - rust-lang#80637 (Use Option::filter instead of open-coding it)
 - rust-lang#80643 (Move variable into the only branch where it is relevant)
 - rust-lang#80656 (Fixed documentation error for `std::hint::spin_loop`)
 - rust-lang#80666 (Fix missing link for "fully qualified syntax")
 - rust-lang#80672 (./x.py clippy: allow the most noisy lints)
 - rust-lang#80677 (doc -- list edit for consistency)
 - rust-lang#80696 (make sure that promoteds which fail to evaluate in dead const code behave correctly)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 1c6593c into rust-lang:master Jan 5, 2021
@rustbot rustbot added this to the 1.51.0 milestone Jan 5, 2021
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

x.py does not warn if test filters for file that does not exist
6 participants