From 53a0dc4aa2462210c0c0f3647644fd9a370fc3fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Mon, 25 Mar 2024 23:19:05 +0100 Subject: [PATCH] Fix tests --- tests/testsuite/profiles.rs | 27 +++++++++++++++++++++++++++ tests/testsuite/run.rs | 2 ++ 2 files changed, 29 insertions(+) diff --git a/tests/testsuite/profiles.rs b/tests/testsuite/profiles.rs index eecbf45f63d..6b3dbb44c0b 100644 --- a/tests/testsuite/profiles.rs +++ b/tests/testsuite/profiles.rs @@ -632,7 +632,9 @@ fn strip_accepts_false_to_disable_strip() { .run(); } +// Temporarily disabled on Windows due to https://github.com/rust-lang/rust/issues/122857 #[cargo_test] +#[cfg(not(windows))] fn strip_debuginfo_in_release() { let p = project() .file( @@ -656,7 +658,32 @@ fn strip_debuginfo_in_release() { .run(); } +// Using -Cstrip=debuginfo in release mode by default is temporarily disabled on Windows due to +// https://github.com/rust-lang/rust/issues/122857 #[cargo_test] +#[cfg(all(target_os = "windows", target_env = "msvc"))] +fn do_not_strip_debuginfo_in_release_on_windows() { + let p = project() + .file( + "Cargo.toml", + r#" + [package] + name = "foo" + version = "0.1.0" + edition = "2015" + "#, + ) + .file("src/main.rs", "fn main() {}") + .build(); + + p.cargo("build --release -v") + .with_stderr_does_not_contain("[..]strip=debuginfo[..]") + .run(); +} + +// Temporarily disabled on Windows due to https://github.com/rust-lang/rust/issues/122857 +#[cargo_test] +#[cfg(not(windows))] fn strip_debuginfo_without_debug() { let p = project() .file( diff --git a/tests/testsuite/run.rs b/tests/testsuite/run.rs index b7720f3a65a..044674ad844 100644 --- a/tests/testsuite/run.rs +++ b/tests/testsuite/run.rs @@ -740,7 +740,9 @@ fn one_bin_multiple_examples() { .run(); } +// Temporarily disabled on Windows due to https://github.com/rust-lang/rust/issues/122857 #[cargo_test] +#[cfg(not(windows))] fn example_with_release_flag() { let p = project() .file(