]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/thread/mod.rs
SGX target: fix std unit tests
[rust.git] / src / libstd / thread / mod.rs
index 08f0aa2f0d2065d403bc27bee0df2ca8fd0eeaa8..8f323b59bf8e1af7950af7fa9d57e115d3a7c686 100644 (file)
@@ -1497,7 +1497,7 @@ mod tests {
     fn test_unnamed_thread() {
         thread::spawn(move|| {
             assert!(thread::current().name().is_none());
-        }).join().ok().unwrap();
+        }).join().ok().expect("thread panicked");
     }
 
     #[test]
@@ -1691,6 +1691,7 @@ fn test_park_timeout_unpark_before() {
     }
 
     #[test]
+    #[cfg_attr(target_env = "sgx", ignore)] // FIXME: https://github.com/fortanix/rust-sgx/issues/31
     fn test_park_timeout_unpark_not_called() {
         for _ in 0..10 {
             thread::park_timeout(Duration::from_millis(10));
@@ -1698,6 +1699,7 @@ fn test_park_timeout_unpark_not_called() {
     }
 
     #[test]
+    #[cfg_attr(target_env = "sgx", ignore)] // FIXME: https://github.com/fortanix/rust-sgx/issues/31
     fn test_park_timeout_unpark_called_other_thread() {
         for _ in 0..10 {
             let th = thread::current();
@@ -1712,6 +1714,7 @@ fn test_park_timeout_unpark_called_other_thread() {
     }
 
     #[test]
+    #[cfg_attr(target_env = "sgx", ignore)] // FIXME: https://github.com/fortanix/rust-sgx/issues/31
     fn sleep_ms_smoke() {
         thread::sleep(Duration::from_millis(2));
     }