Skip to content

Commit

Permalink
Temporarily disable windows env test.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Jul 2, 2021
1 parent 4952979 commit c10864a
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions tests/testsuite/tool_paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,8 @@ fn custom_linker_env() {
}

#[cargo_test]
// Temporarily disabled until https://github.com/rust-lang/rust/pull/85270 is in nightly.
#[cfg_attr(target_os = "windows", ignore)]
fn target_in_environment_contains_lower_case() {
let p = project().file("src/main.rs", "fn main() {}").build();

Expand All @@ -363,22 +365,16 @@ fn target_in_environment_contains_lower_case() {
target.to_lowercase().replace('-', "_")
);

let mut execs = p.cargo("build -v --target");
execs.arg(target).env(&env_key, "nonexistent-linker");
if cfg!(windows) {
// Windows env keys are case insensitive, so no warning, but it will
// fail due to the missing linker.
execs
.with_stderr_does_not_contain("warning:[..]")
.with_status(101);
} else {
execs.with_stderr_contains(format!(
"warning: Environment variables are expected to use uppercase letters and underscores, \
the variable `{}` will be ignored and have no effect",
p.cargo("build -v --target")
.arg(target)
.env(&env_key, "nonexistent-linker")
.with_stderr_contains(format!(
"warning: Environment variables are expected to use uppercase \
letters and underscores, the variable `{}` will be ignored and \
have no effect",
env_key
));
}
execs.run();
))
.run();
}

#[cargo_test]
Expand Down

0 comments on commit c10864a

Please sign in to comment.