Skip to content

Commit 6e31c13

Browse files
committed
Auto merge of #9646 - ehuss:windows-case-disable, r=alexcrichton
Temporarily disable windows env test. This temporarily disables the `target_in_environment_contains_lower_case` test on Windows until rust-lang/rust#85270 gets into nightly. That PR changes it so that env vars are case-preserved on Windows. My intent is that after that is in nightly, we can remove the windows-specific code in `Config`, and this test should work the same on all platforms. Closes #9630
2 parents b747054 + c10864a commit 6e31c13

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

tests/testsuite/tool_paths.rs

+11-15
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,8 @@ fn custom_linker_env() {
354354
}
355355

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

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

366-
let mut execs = p.cargo("build -v --target");
367-
execs.arg(target).env(&env_key, "nonexistent-linker");
368-
if cfg!(windows) {
369-
// Windows env keys are case insensitive, so no warning, but it will
370-
// fail due to the missing linker.
371-
execs
372-
.with_stderr_does_not_contain("warning:[..]")
373-
.with_status(101);
374-
} else {
375-
execs.with_stderr_contains(format!(
376-
"warning: Environment variables are expected to use uppercase letters and underscores, \
377-
the variable `{}` will be ignored and have no effect",
368+
p.cargo("build -v --target")
369+
.arg(target)
370+
.env(&env_key, "nonexistent-linker")
371+
.with_stderr_contains(format!(
372+
"warning: Environment variables are expected to use uppercase \
373+
letters and underscores, the variable `{}` will be ignored and \
374+
have no effect",
378375
env_key
379-
));
380-
}
381-
execs.run();
376+
))
377+
.run();
382378
}
383379

384380
#[cargo_test]

0 commit comments

Comments
 (0)