Skip to content

Commit

Permalink
Auto merge of #10899 - ehuss:empty-wrapper-test, r=weihanglo
Browse files Browse the repository at this point in the history
Make the empty rustc-wrapper test more explicit.

This changes the test for an empty RUSTC_WRAPPER environment variable to make it explicit that it doesn't just ignore the environment variable, but that it also essentially unsets any config-loaded value.  It's not clear if this implication was known at the time it was added in #5985, but I don't think we can change it, and it can be useful.
  • Loading branch information
bors committed Jul 24, 2022
2 parents 27f4f02 + 8a487ab commit 85b500c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/testsuite/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,18 @@ fn check_keep_going() {

#[cargo_test]
fn does_not_use_empty_rustc_wrapper() {
let p = project().file("src/lib.rs", "").build();
// An empty RUSTC_WRAPPER environment variable won't be used.
// The env var will also override the config, essentially unsetting it.
let p = project()
.file("src/lib.rs", "")
.file(
".cargo/config.toml",
r#"
[build]
rustc-wrapper = "do-not-execute-me"
"#,
)
.build();
p.cargo("check").env("RUSTC_WRAPPER", "").run();
}

Expand Down

0 comments on commit 85b500c

Please sign in to comment.