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

cargo-ui tests: check that <dir>/src exists before processing test #5662

Merged
merged 1 commit into from
May 31, 2020

Conversation

ebroto
Copy link
Member

@ebroto ebroto commented May 28, 2020

I forgot that I had fixed this in a PR I closed some days ago (#5643).

Before this change, cargo UI tests could fail when switching between branches if the previous branch had a test that the current branch does not have. The directory is not removed when switching because an ignored Cargo.lock file exists, and the code was trying to reach $DIR/src unconditionally.

This change will just skip a directory that has no src subdirectory.

changelog: none

@rust-highfive
Copy link

r? @flip1995

(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 May 28, 2020
tests/compile-test.rs Outdated Show resolved Hide resolved
@flip1995
Copy link
Member

I also realized, that this doesn't work in the rustc test suite. Are you motivated to look into that? If you need help to set up the rustc test suite, feel free to ask.

r=me with @matthiaskrgr comment addressed.

@ebroto
Copy link
Member Author

ebroto commented May 31, 2020

I also realized, that this doesn't work in the rustc test suite. Are you motivated to look into that? If you need help to set up the rustc test suite, feel free to ask.

Sure, I'll take a look at it in the coming days

@flip1995 flip1995 added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels May 31, 2020
@ebroto ebroto force-pushed the cargo_tests_invalid_crate branch from f10ca00 to 27c0166 Compare May 31, 2020 18:38
@ebroto ebroto force-pushed the cargo_tests_invalid_crate branch from 27c0166 to 14e9100 Compare May 31, 2020 18:39
@flip1995
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented May 31, 2020

📌 Commit 14e9100 has been approved by flip1995

@bors
Copy link
Contributor

bors commented May 31, 2020

⌛ Testing commit 14e9100 with merge 9f9877c...

@bors
Copy link
Contributor

bors commented May 31, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing 9f9877c to master...

@bors bors merged commit 9f9877c into rust-lang:master May 31, 2020
@ebroto ebroto deleted the cargo_tests_invalid_crate branch June 5, 2020 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants