diff options
| author | Brian Anderson <banderson@mozilla.com> | 2016-09-22 20:04:48 +0000 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2016-09-30 14:02:56 -0700 |
| commit | 096670ca41a2aada11722acf4d0ab35a422448f6 (patch) | |
| tree | fe992314b50cc45903dbb3760ee41ced71ad5d27 /src/libstd/sync | |
| parent | 525a798ca6513a204de8bd434bf260d79cbdfc9f (diff) | |
Ignore various entire test modules on emscripten
Diffstat (limited to 'src/libstd/sync')
| -rw-r--r-- | src/libstd/sync/mpsc/mpsc_queue.rs | 3 | ||||
| -rw-r--r-- | src/libstd/sync/mpsc/spsc_queue.rs | 3 | ||||
| -rw-r--r-- | src/libstd/sync/mutex.rs | 10 | ||||
| -rw-r--r-- | src/libstd/sync/once.rs | 4 | ||||
| -rw-r--r-- | src/libstd/sync/rwlock.rs | 11 |
5 files changed, 5 insertions, 26 deletions
diff --git a/src/libstd/sync/mpsc/mpsc_queue.rs b/src/libstd/sync/mpsc/mpsc_queue.rs index 2ff9ffe6d08..8d80f942ff7 100644 --- a/src/libstd/sync/mpsc/mpsc_queue.rs +++ b/src/libstd/sync/mpsc/mpsc_queue.rs @@ -146,7 +146,7 @@ impl<T> Drop for Queue<T> { } } -#[cfg(test)] +#[cfg(all(test, not(target_os = "emscripten")))] mod tests { use sync::mpsc::channel; use super::{Queue, Data, Empty, Inconsistent}; @@ -161,7 +161,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn test() { let nthreads = 8; let nmsgs = 1000; diff --git a/src/libstd/sync/mpsc/spsc_queue.rs b/src/libstd/sync/mpsc/spsc_queue.rs index cb9577f155e..5858e4b6ddb 100644 --- a/src/libstd/sync/mpsc/spsc_queue.rs +++ b/src/libstd/sync/mpsc/spsc_queue.rs @@ -231,7 +231,7 @@ impl<T> Drop for Queue<T> { } } -#[cfg(test)] +#[cfg(all(test, not(target_os = "emscripten")))] mod tests { use sync::Arc; use super::Queue; @@ -305,7 +305,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn stress() { unsafe { stress_bound(0); diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs index 07d60f0610f..812724c7a16 100644 --- a/src/libstd/sync/mutex.rs +++ b/src/libstd/sync/mutex.rs @@ -352,7 +352,7 @@ pub fn guard_poison<'a, T: ?Sized>(guard: &MutexGuard<'a, T>) -> &'a poison::Fla &guard.__lock.poison } -#[cfg(test)] +#[cfg(all(test, not(target_os = "emscripten")))] mod tests { use sync::mpsc::channel; use sync::{Arc, Mutex, Condvar}; @@ -375,7 +375,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn lots_and_lots() { const J: u32 = 1000; const K: u32 = 3; @@ -436,7 +435,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_into_inner_poison() { let m = Arc::new(Mutex::new(NonCopy(10))); let m2 = m.clone(); @@ -460,7 +458,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_get_mut_poison() { let m = Arc::new(Mutex::new(NonCopy(10))); let m2 = m.clone(); @@ -477,7 +474,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_mutex_arc_condvar() { let packet = Packet(Arc::new((Mutex::new(false), Condvar::new()))); let packet2 = Packet(packet.0.clone()); @@ -501,7 +497,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_arc_condvar_poison() { let packet = Packet(Arc::new((Mutex::new(1), Condvar::new()))); let packet2 = Packet(packet.0.clone()); @@ -531,7 +526,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_mutex_arc_poison() { let arc = Arc::new(Mutex::new(1)); assert!(!arc.is_poisoned()); @@ -545,7 +539,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_mutex_arc_nested() { // Tests nested mutexes and access // to underlying data. @@ -562,7 +555,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_mutex_arc_access_in_unwind() { let arc = Arc::new(Mutex::new(1)); let arc2 = arc.clone(); diff --git a/src/libstd/sync/once.rs b/src/libstd/sync/once.rs index 64c3e2bb42f..ad9d0b37544 100644 --- a/src/libstd/sync/once.rs +++ b/src/libstd/sync/once.rs @@ -367,7 +367,7 @@ impl OnceState { } } -#[cfg(test)] +#[cfg(all(test, not(target_os = "emscripten")))] mod tests { use panic; use sync::mpsc::channel; @@ -385,7 +385,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn stampede_once() { static O: Once = Once::new(); static mut run: bool = false; @@ -448,7 +447,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn wait_for_force_to_finish() { static O: Once = Once::new(); diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs index cb46b694f37..48ecae185f9 100644 --- a/src/libstd/sync/rwlock.rs +++ b/src/libstd/sync/rwlock.rs @@ -380,7 +380,7 @@ impl<'a, T: ?Sized> Drop for RwLockWriteGuard<'a, T> { } } -#[cfg(test)] +#[cfg(all(test, not(target_os = "emscripten")))] mod tests { #![allow(deprecated)] // rand @@ -403,7 +403,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn frob() { const N: usize = 10; const M: usize = 1000; @@ -431,7 +430,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_rw_arc_poison_wr() { let arc = Arc::new(RwLock::new(1)); let arc2 = arc.clone(); @@ -443,7 +441,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_rw_arc_poison_ww() { let arc = Arc::new(RwLock::new(1)); assert!(!arc.is_poisoned()); @@ -457,7 +454,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_rw_arc_no_poison_rr() { let arc = Arc::new(RwLock::new(1)); let arc2 = arc.clone(); @@ -469,7 +465,6 @@ mod tests { assert_eq!(*lock, 1); } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_rw_arc_no_poison_rw() { let arc = Arc::new(RwLock::new(1)); let arc2 = arc.clone(); @@ -482,7 +477,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_rw_arc() { let arc = Arc::new(RwLock::new(0)); let arc2 = arc.clone(); @@ -521,7 +515,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_rw_arc_access_in_unwind() { let arc = Arc::new(RwLock::new(1)); let arc2 = arc.clone(); @@ -594,7 +587,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_into_inner_poison() { let m = Arc::new(RwLock::new(NonCopy(10))); let m2 = m.clone(); @@ -618,7 +610,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_get_mut_poison() { let m = Arc::new(RwLock::new(NonCopy(10))); let m2 = m.clone(); |
