From 89bb796933199122d2e91bc5e8ee81ff771424cc Mon Sep 17 00:00:00 2001 From: Federico Poli Date: Tue, 26 Mar 2024 10:27:48 +0100 Subject: [PATCH] Skip a test on macOS due to unreliable MIR --- analysis/tests/test_analysis.rs | 34 ++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/analysis/tests/test_analysis.rs b/analysis/tests/test_analysis.rs index 8fcfbb062d..78ed1876ef 100644 --- a/analysis/tests/test_analysis.rs +++ b/analysis/tests/test_analysis.rs @@ -59,24 +59,28 @@ fn test_runner(_tests: &[&()]) { "tests/test_cases/maybe_borrowed", vec!["--analysis=MaybeBorrowedAnalysis".into()], ); - run_tests( - "ui", - "tests/test_cases/definitely_accessible", - vec!["--analysis=DefinitelyAccessibleAnalysis".into()], - ); run_tests( "ui", "tests/test_cases/definitely_blocked", vec!["--analysis=DefinitelyUnreachableAnalysis".into()], ); - run_tests( - "ui", - "tests/test_cases/framing", - vec!["--analysis=FramingAnalysis".into()], - ); - run_tests( - "ui", - "tests/test_cases/locally_shared", - vec!["--analysis=LocallySharedAnalysis".into()], - ); + // These tests are disabled because on macOS the compiler generates slightly different MIRs + // than on Linux and Windows, which causes some tests (`mutex*.rs` and `drop.rs`) to fail. + if !cfg!(target_os = "macos") { + run_tests( + "ui", + "tests/test_cases/definitely_accessible", + vec!["--analysis=DefinitelyAccessibleAnalysis".into()], + ); + run_tests( + "ui", + "tests/test_cases/framing", + vec!["--analysis=FramingAnalysis".into()], + ); + run_tests( + "ui", + "tests/test_cases/locally_shared", + vec!["--analysis=LocallySharedAnalysis".into()], + ); + } }