diff options
Diffstat (limited to 'src/libstd/thread')
| -rw-r--r-- | src/libstd/thread/local.rs | 6 | ||||
| -rw-r--r-- | src/libstd/thread/mod.rs | 19 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs index c44dee49f14..59748b47d81 100644 --- a/src/libstd/thread/local.rs +++ b/src/libstd/thread/local.rs @@ -541,6 +541,7 @@ mod tests { } #[test] + #[cfg_attr(target_os = "emscripten", ignore)] fn smoke_no_dtor() { thread_local!(static FOO: Cell<i32> = Cell::new(1)); @@ -563,6 +564,7 @@ mod tests { } #[test] + #[cfg_attr(target_os = "emscripten", ignore)] fn states() { struct Foo; impl Drop for Foo { @@ -586,6 +588,7 @@ mod tests { } #[test] + #[cfg_attr(target_os = "emscripten", ignore)] fn smoke_dtor() { thread_local!(static FOO: UnsafeCell<Option<Foo>> = UnsafeCell::new(None)); @@ -600,6 +603,7 @@ mod tests { } #[test] + #[cfg_attr(target_os = "emscripten", ignore)] fn circular() { struct S1; struct S2; @@ -640,6 +644,7 @@ mod tests { } #[test] + #[cfg_attr(target_os = "emscripten", ignore)] fn self_referential() { struct S1; thread_local!(static K1: UnsafeCell<Option<S1>> = UnsafeCell::new(None)); @@ -661,6 +666,7 @@ mod tests { // test on OSX. #[test] #[cfg_attr(target_os = "macos", ignore)] + #[cfg_attr(target_os = "emscripten", ignore)] fn dtors_in_dtors_in_dtors() { struct S1(Sender<()>); thread_local!(static K1: UnsafeCell<Option<S1>> = UnsafeCell::new(None)); diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs index d8e021bb04f..b42a0fa3ac1 100644 --- a/src/libstd/thread/mod.rs +++ b/src/libstd/thread/mod.rs @@ -755,6 +755,7 @@ mod tests { // !!! instead of exiting cleanly. This might wedge the buildbots. !!! #[test] + #[cfg_attr(target_os = "emscripten", ignore)] fn test_unnamed_thread() { thread::spawn(move|| { assert!(thread::current().name().is_none()); @@ -762,6 +763,7 @@ mod tests { } #[test] + #[cfg_attr(target_os = "emscripten", ignore)] fn test_named_thread() { Builder::new().name("ada lovelace".to_string()).spawn(move|| { assert!(thread::current().name().unwrap() == "ada lovelace".to_string()); @@ -770,11 +772,13 @@ mod tests { #[test] #[should_panic] + #[cfg_attr(target_os = "emscripten", ignore)] fn test_invalid_named_thread() { let _ = Builder::new().name("ada l\0velace".to_string()).spawn(|| {}); } #[test] + #[cfg_attr(target_os = "emscripten", ignore)] fn test_run_basic() { let (tx, rx) = channel(); thread::spawn(move|| { @@ -784,6 +788,7 @@ mod tests { } #[test] + #[cfg_attr(target_os = "emscripten", ignore)] fn test_join_panic() { match thread::spawn(move|| { panic!() @@ -794,6 +799,7 @@ mod tests { } #[test] + #[cfg_attr(target_os = "emscripten", ignore)] fn test_spawn_sched() { let (tx, rx) = channel(); @@ -813,6 +819,7 @@ mod tests { } #[test] + #[cfg_attr(target_os = "emscripten", ignore)] fn test_spawn_sched_childs_on_default_sched() { let (tx, rx) = channel(); @@ -841,6 +848,7 @@ mod tests { } #[test] + #[cfg_attr(target_os = "emscripten", ignore)] fn test_avoid_copying_the_body_spawn() { avoid_copying_the_body(|v| { thread::spawn(move || v()); @@ -848,6 +856,7 @@ mod tests { } #[test] + #[cfg_attr(target_os = "emscripten", ignore)] fn test_avoid_copying_the_body_thread_spawn() { avoid_copying_the_body(|f| { thread::spawn(move|| { @@ -857,6 +866,7 @@ mod tests { } #[test] + #[cfg_attr(target_os = "emscripten", ignore)] fn test_avoid_copying_the_body_join() { avoid_copying_the_body(|f| { let _ = thread::spawn(move|| { @@ -866,6 +876,7 @@ mod tests { } #[test] + #[cfg_attr(target_os = "emscripten", ignore)] fn test_child_doesnt_ref_parent() { // If the child refcounts the parent thread, this will stack overflow when // climbing the thread tree to dereference each ancestor. (See #1789) @@ -883,11 +894,13 @@ mod tests { } #[test] + #[cfg_attr(target_os = "emscripten", ignore)] fn test_simple_newsched_spawn() { thread::spawn(move || {}); } #[test] + #[cfg_attr(target_os = "emscripten", ignore)] fn test_try_panic_message_static_str() { match thread::spawn(move|| { panic!("static string"); @@ -902,6 +915,7 @@ mod tests { } #[test] + #[cfg_attr(target_os = "emscripten", ignore)] fn test_try_panic_message_owned_str() { match thread::spawn(move|| { panic!("owned string".to_string()); @@ -916,6 +930,7 @@ mod tests { } #[test] + #[cfg_attr(target_os = "emscripten", ignore)] fn test_try_panic_message_any() { match thread::spawn(move|| { panic!(box 413u16 as Box<Any + Send>); @@ -932,6 +947,7 @@ mod tests { } #[test] + #[cfg_attr(target_os = "emscripten", ignore)] fn test_try_panic_message_unit_struct() { struct Juju; @@ -944,6 +960,7 @@ mod tests { } #[test] + #[cfg_attr(target_os = "emscripten", ignore)] fn test_park_timeout_unpark_before() { for _ in 0..10 { thread::current().unpark(); @@ -952,6 +969,7 @@ mod tests { } #[test] + #[cfg_attr(target_os = "emscripten", ignore)] fn test_park_timeout_unpark_not_called() { for _ in 0..10 { thread::park_timeout(Duration::from_millis(10)); @@ -959,6 +977,7 @@ mod tests { } #[test] + #[cfg_attr(target_os = "emscripten", ignore)] fn test_park_timeout_unpark_called_other_thread() { for _ in 0..10 { let th = thread::current(); |
