From db7274ecb02e97e5148f52c1e83862bc0b6875e4 Mon Sep 17 00:00:00 2001 From: David Barsky Date: Mon, 25 Nov 2024 11:45:30 -0500 Subject: [PATCH] internal: ignore parallel tests under miri --- tests/parallel/parallel_map.rs | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/tests/parallel/parallel_map.rs b/tests/parallel/parallel_map.rs index b1b6cd4e..80e4ebea 100644 --- a/tests/parallel/parallel_map.rs +++ b/tests/parallel/parallel_map.rs @@ -15,17 +15,6 @@ struct ParallelInput { fn tracked_fn(db: &dyn salsa::Database, input: ParallelInput) -> Vec { salsa::par_map(db, input.field(db), |_db, field| field + 1) } - -#[test] -fn execute() { - let db = salsa::DatabaseImpl::new(); - - let counts = (1..=10).collect::>(); - let input = ParallelInput::new(&db, counts); - - tracked_fn(&db, input); -} - #[salsa::tracked] fn a1(db: &dyn KnobsDatabase, input: ParallelInput) -> Vec { db.signal(1); @@ -40,8 +29,20 @@ fn dummy(_db: &dyn KnobsDatabase, _input: ParallelInput) -> ParallelInput { panic!("should never get here!") } +#[test] +#[cfg_attr(miri, ignore)] +fn execute() { + let db = salsa::DatabaseImpl::new(); + + let counts = (1..=10).collect::>(); + let input = ParallelInput::new(&db, counts); + + tracked_fn(&db, input); +} + // we expect this to panic, as `salsa::par_map` needs to be called from a query. #[test] +#[cfg_attr(miri, ignore)] #[should_panic] fn direct_calls_panic() { let db = salsa::DatabaseImpl::new(); @@ -67,6 +68,7 @@ fn direct_calls_panic() { // panics #[test] +#[cfg_attr(miri, ignore)] fn execute_cancellation() { let mut db = Knobs::default();