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.
This commit is contained in:
Dario Nieuwenhuis 2021-09-13 01:04:00 +02:00
parent c98804daec
commit 4c203532ba
2 changed files with 5 additions and 0 deletions

View File

@ -621,6 +621,7 @@ mod tests {
}
#[test]
#[cfg_attr(miri, ignore)] // too slow
fn len() {
let mut rb: Queue<i32, 3> = Queue::new();
@ -641,6 +642,7 @@ mod tests {
}
#[test]
#[cfg_attr(miri, ignore)] // too slow
fn try_overflow() {
const N: usize = 23;
let mut rb: Queue<i32, N> = Queue::new();

View File

@ -74,6 +74,7 @@ fn scoped() {
}
#[test]
#[cfg_attr(miri, ignore)] // too slow
fn contention() {
const N: usize = 1024;
@ -118,6 +119,7 @@ fn contention() {
}
#[test]
#[cfg_attr(miri, ignore)] // too slow
fn mpmc_contention() {
const N: u32 = 64;
@ -163,6 +165,7 @@ fn mpmc_contention() {
}
#[test]
#[cfg_attr(miri, ignore)] // too slow
fn unchecked() {
const N: usize = 1024;