From cd1f08899eaa0629d99e503bfeb5ef8df31bd091 Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Wed, 7 Feb 2024 09:44:15 -0500 Subject: [PATCH] test: disable lldb test as it requires privileges to run on macOS --- tests/testsuite/profile_trim_paths.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/testsuite/profile_trim_paths.rs b/tests/testsuite/profile_trim_paths.rs index 05693595fa0..c7a4784d685 100644 --- a/tests/testsuite/profile_trim_paths.rs +++ b/tests/testsuite/profile_trim_paths.rs @@ -1,10 +1,12 @@ //! Tests for `-Ztrim-paths`. use cargo_test_support::basic_manifest; +use cargo_test_support::compare::match_contains; use cargo_test_support::git; use cargo_test_support::paths; use cargo_test_support::project; use cargo_test_support::registry::Package; +use cargo_util::is_ci; #[cargo_test] fn gated_manifest() { @@ -694,7 +696,11 @@ fn custom_build_env_var_trim_paths() { #[cfg(unix)] #[cargo_test(requires_lldb, nightly, reason = "-Zremap-path-scope is unstable")] fn lldb_works_after_trimmed() { - use cargo_test_support::compare::match_contains; + if !is_ci() { + // On macOS lldb requires elevated privileges to run developer tools. + // See rust-lang/cargo#13413 + return; + } let run_lldb = |path| { std::process::Command::new("lldb")