Skip to content

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

Merged
bors merged 1 commit into
rust-lang:masterfrom
ebroto:cargo_tests_invalid_crate
May 31, 2020
Merged

cargo-ui tests: check that <dir>/src exists before processing test#5662
bors merged 1 commit into
rust-lang:masterfrom
ebroto:cargo_tests_invalid_crate

Conversation

@ebroto

@ebroto ebroto commented May 28, 2020

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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
Comment thread tests/compile-test.rs
@flip1995

Copy link
Copy Markdown
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

ebroto commented May 31, 2020

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Member

@bors r+

@bors

bors commented May 31, 2020

Copy link
Copy Markdown
Contributor

📌 Commit 14e9100 has been approved by flip1995

@bors

bors commented May 31, 2020

Copy link
Copy Markdown
Contributor

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

@bors

bors commented May 31, 2020

Copy link
Copy Markdown
Contributor

☀️ 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