Skip to content

Commit

Permalink
internal: ignore parallel tests under miri
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbarsky committed Nov 25, 2024
1 parent 5f0904a commit db7274e
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions tests/parallel/parallel_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,6 @@ struct ParallelInput {
fn tracked_fn(db: &dyn salsa::Database, input: ParallelInput) -> Vec<u32> {
salsa::par_map(db, input.field(db), |_db, field| field + 1)
}

#[test]
fn execute() {
let db = salsa::DatabaseImpl::new();

let counts = (1..=10).collect::<Vec<u32>>();
let input = ParallelInput::new(&db, counts);

tracked_fn(&db, input);
}

#[salsa::tracked]
fn a1(db: &dyn KnobsDatabase, input: ParallelInput) -> Vec<u32> {
db.signal(1);
Expand All @@ -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::<Vec<u32>>();
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();
Expand All @@ -67,6 +68,7 @@ fn direct_calls_panic() {
// panics

#[test]
#[cfg_attr(miri, ignore)]
fn execute_cancellation() {
let mut db = Knobs::default();

Expand Down

0 comments on commit db7274e

Please sign in to comment.