about summary refs log tree commit diff
path: root/library/std/tests
diff options
context:
space:
mode:
authorNicola Krumschmidt <git@nkcom.de>2024-09-04 02:18:32 +0200
committerNicola Krumschmidt <git@nkcom.de>2024-09-29 04:48:13 +0200
commit87f17f3ccb69e9827562522ae1a38f84d2ba998a (patch)
treed9ca03f59b55b85e2ea912e0bb6d6349305ff3b2 /library/std/tests
parent3b11c82a3d625a01dd5f7b91785374103eb41589 (diff)
downloadrust-87f17f3ccb69e9827562522ae1a38f84d2ba998a.tar.gz
rust-87f17f3ccb69e9827562522ae1a38f84d2ba998a.zip
Fix std tests for wasm32-wasip2 target
Diffstat (limited to 'library/std/tests')
-rw-r--r--library/std/tests/create_dir_all_bare.rs2
-rw-r--r--library/std/tests/process_spawning.rs2
-rw-r--r--library/std/tests/thread.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/library/std/tests/create_dir_all_bare.rs b/library/std/tests/create_dir_all_bare.rs
index 8becf713205..30f800c5aa2 100644
--- a/library/std/tests/create_dir_all_bare.rs
+++ b/library/std/tests/create_dir_all_bare.rs
@@ -1,4 +1,4 @@
-#![cfg(all(test, not(any(target_os = "emscripten", target_env = "sgx"))))]
+#![cfg(all(test, not(any(target_os = "emscripten", target_os = "wasi", target_env = "sgx"))))]
 
 //! Note that this test changes the current directory so
 //! should not be in the same process as other tests.
diff --git a/library/std/tests/process_spawning.rs b/library/std/tests/process_spawning.rs
index d249eb7d50a..3e72e371ade 100644
--- a/library/std/tests/process_spawning.rs
+++ b/library/std/tests/process_spawning.rs
@@ -5,7 +5,7 @@ use std::{env, fs, process, str};
 mod common;
 
 #[test]
-#[cfg_attr(miri, ignore)] // Process spawning not supported by Miri
+#[cfg_attr(any(miri, target_os = "wasi"), ignore)] // Process spawning not supported by Miri and wasi
 fn issue_15149() {
     // If we're the parent, copy our own binary to a new directory.
     let my_path = env::current_exe().unwrap();
diff --git a/library/std/tests/thread.rs b/library/std/tests/thread.rs
index fc9917178b2..83574176186 100644
--- a/library/std/tests/thread.rs
+++ b/library/std/tests/thread.rs
@@ -4,7 +4,7 @@ use std::thread;
 use std::time::Duration;
 
 #[test]
-#[cfg_attr(target_os = "emscripten", ignore)]
+#[cfg_attr(any(target_os = "emscripten", target_os = "wasi"), ignore)] // no threads
 #[cfg_attr(miri, ignore)] // Miri does not like the thread leak
 fn sleep_very_long() {
     let finished = Arc::new(Mutex::new(false));