Skip to content

Commit 4c20353

Browse files
committed
Ignore slow tests when running in miri.
There's a few tests that do millions of iterations. Miri is incredibly slow and takes too long to run these (I gave up waiting after 5+ minutes), so we ignore them when testing with miri.
1 parent c98804d commit 4c20353

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/spsc.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,7 @@ mod tests {
621621
}
622622

623623
#[test]
624+
#[cfg_attr(miri, ignore)] // too slow
624625
fn len() {
625626
let mut rb: Queue<i32, 3> = Queue::new();
626627

@@ -641,6 +642,7 @@ mod tests {
641642
}
642643

643644
#[test]
645+
#[cfg_attr(miri, ignore)] // too slow
644646
fn try_overflow() {
645647
const N: usize = 23;
646648
let mut rb: Queue<i32, N> = Queue::new();

tests/tsan.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ fn scoped() {
7474
}
7575

7676
#[test]
77+
#[cfg_attr(miri, ignore)] // too slow
7778
fn contention() {
7879
const N: usize = 1024;
7980

@@ -118,6 +119,7 @@ fn contention() {
118119
}
119120

120121
#[test]
122+
#[cfg_attr(miri, ignore)] // too slow
121123
fn mpmc_contention() {
122124
const N: u32 = 64;
123125

@@ -163,6 +165,7 @@ fn mpmc_contention() {
163165
}
164166

165167
#[test]
168+
#[cfg_attr(miri, ignore)] // too slow
166169
fn unchecked() {
167170
const N: usize = 1024;
168171

0 commit comments

Comments
 (0)