Skip to content

Commit f0e861e

Browse files
committed
exclude pool tests from miri tests
1 parent 6575743 commit f0e861e

File tree

7 files changed

+22
-0
lines changed

7 files changed

+22
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ let sum = inputs.par().sum();
525525
assert_eq!(sum, sum2);
526526
}
527527

528+
#[cfg(not(miri))]
528529
#[cfg(feature = "scoped_threadpool")]
529530
{
530531
let mut pool = scoped_threadpool::Pool::new(8);
@@ -533,6 +534,7 @@ let sum = inputs.par().sum();
533534
assert_eq!(sum, sum2);
534535
}
535536

537+
#[cfg(not(miri))]
536538
#[cfg(feature = "rayon-core")]
537539
{
538540
let pool = rayon_core::ThreadPoolBuilder::new()
@@ -544,6 +546,7 @@ let sum = inputs.par().sum();
544546
assert_eq!(sum, sum2);
545547
}
546548

549+
#[cfg(not(miri))]
547550
#[cfg(feature = "yastl")]
548551
{
549552
let pool = YastlPool::new(8);

src/par_iter.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ where
286286
/// assert_eq!(sum, sum2);
287287
/// }
288288
///
289+
/// #[cfg(not(miri))]
289290
/// #[cfg(feature = "scoped_threadpool")]
290291
/// {
291292
/// let mut pool = scoped_threadpool::Pool::new(8);
@@ -295,6 +296,7 @@ where
295296
/// assert_eq!(sum, sum2);
296297
/// }
297298
///
299+
/// #[cfg(not(miri))]
298300
/// #[cfg(feature = "rayon-core")]
299301
/// {
300302
/// let pool = rayon_core::ThreadPoolBuilder::new()
@@ -354,6 +356,7 @@ where
354356
/// assert_eq!(sum, sum2);
355357
/// }
356358
///
359+
/// #[cfg(not(miri))]
357360
/// #[cfg(feature = "scoped_threadpool")]
358361
/// {
359362
/// let mut pool = scoped_threadpool::Pool::new(8);
@@ -363,6 +366,7 @@ where
363366
/// assert_eq!(sum, sum2);
364367
/// }
365368
///
369+
/// #[cfg(not(miri))]
366370
/// #[cfg(feature = "rayon-core")]
367371
/// {
368372
/// let pool = rayon_core::ThreadPoolBuilder::new()

src/par_thread_pool.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ use orx_concurrent_bag::ConcurrentBag;
4040
/// ```
4141
/// use orx_parallel::*;
4242
///
43+
/// #[cfg(not(miri))]
4344
/// #[cfg(feature = "rayon-core")]
4445
/// {
4546
/// let pool = rayon::ThreadPoolBuilder::new()
@@ -72,6 +73,7 @@ use orx_concurrent_bag::ConcurrentBag;
7273
/// ```
7374
/// use orx_parallel::*;
7475
///
76+
/// #[cfg(not(miri))]
7577
/// #[cfg(feature = "scoped_threadpool")]
7678
/// {
7779
/// // creating a runner for the computation

src/runner/implementations/runner_with_pool.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ use core::marker::PhantomData;
4646
/// }
4747
///
4848
/// // uses rayon-core ThreadPool with 8 threads
49+
/// #[cfg(not(miri))]
4950
/// #[cfg(feature = "rayon-core")]
5051
/// {
5152
/// let pool = rayon_core::ThreadPoolBuilder::new()
@@ -57,6 +58,7 @@ use core::marker::PhantomData;
5758
/// }
5859
///
5960
/// // uses scoped-pool Pool with 8 threads
61+
/// #[cfg(not(miri))]
6062
/// #[cfg(feature = "scoped-pool")]
6163
/// {
6264
/// let pool = scoped_pool::Pool::new(8);
@@ -65,6 +67,7 @@ use core::marker::PhantomData;
6567
/// }
6668
///
6769
/// // uses scoped_threadpool Pool with 8 threads
70+
/// #[cfg(not(miri))]
6871
/// #[cfg(feature = "scoped_threadpool")]
6972
/// {
7073
/// let mut pool = scoped_threadpool::Pool::new(8);
@@ -73,6 +76,7 @@ use core::marker::PhantomData;
7376
/// }
7477
///
7578
/// // uses yastl Pool wrapped as YastlPool with 8 threads
79+
/// #[cfg(not(miri))]
7680
/// #[cfg(feature = "yastl")]
7781
/// {
7882
/// let pool = YastlPool::new(8);
@@ -81,6 +85,7 @@ use core::marker::PhantomData;
8185
/// }
8286
///
8387
/// // uses pond Pool wrapped as PondPool with 8 threads
88+
/// #[cfg(not(miri))]
8489
/// #[cfg(feature = "pond")]
8590
/// {
8691
/// let mut pool = PondPool::new_threads_unbounded(8);
@@ -89,6 +94,7 @@ use core::marker::PhantomData;
8994
/// }
9095
///
9196
/// // uses poolite Pool with 8 threads
97+
/// #[cfg(not(miri))]
9298
/// #[cfg(feature = "poolite")]
9399
/// {
94100
/// let pool = poolite::Pool::with_builder(poolite::Builder::new().min(8).max(8)).unwrap();
@@ -153,6 +159,7 @@ where
153159
/// let vec: Vec<_> = (0..42).collect();
154160
/// let input = vec.as_slice();
155161
///
162+
/// #[cfg(not(miri))]
156163
/// #[cfg(feature = "rayon-core")]
157164
/// {
158165
/// let pool = rayon_core::ThreadPoolBuilder::new()

src/runner/implementations/tests/pond.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ const N: [usize; 2] = [37, 125];
1010
#[cfg(not(miri))]
1111
const N: [usize; 2] = [1025, 4735];
1212

13+
// TODO: miri test terminates with: the main thread terminated without waiting for all remaining threads
14+
#[cfg(not(miri))]
1315
#[test_matrix(
1416
[0, 1, N[0], N[1]],
1517
[1, 4],

src/runner/implementations/tests/scoped_threadpool.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ const N: [usize; 2] = [37, 125];
88
#[cfg(not(miri))]
99
const N: [usize; 2] = [1025, 4735];
1010

11+
// TODO: miri test terminates with: the main thread terminated without waiting for all remaining threads
12+
#[cfg(not(miri))]
1113
#[test_matrix(
1214
[0, 1, N[0], N[1]],
1315
[1, 4],

src/runner/implementations/tests/yastl.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ const N: [usize; 2] = [37, 125];
1111
#[cfg(not(miri))]
1212
const N: [usize; 2] = [1025, 4735];
1313

14+
// TODO: miri test terminates with: the main thread terminated without waiting for all remaining threads
15+
#[cfg(not(miri))]
1416
#[test_matrix(
1517
[0, 1, N[0], N[1]],
1618
[1, 4],

0 commit comments

Comments
 (0)