about summary refs log tree commit diff
path: root/library/test
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-05-03 23:34:24 -0400
committerGitHub <noreply@github.com>2024-05-03 23:34:24 -0400
commit683197701cd926e7f3c7077abc7411ae1c462677 (patch)
tree3518eb16653696e6fc5fcb6de5fa4e394bbad220 /library/test
parent93ca906cb572d8754dc43773a3cd502717fd8f07 (diff)
parentdde17cf3ee25d3212aae47907ef5e9edc056cd5b (diff)
downloadrust-683197701cd926e7f3c7077abc7411ae1c462677.tar.gz
rust-683197701cd926e7f3c7077abc7411ae1c462677.zip
Rollup merge of #124681 - risc0:erik/fix-test, r=joboet
zkvm: fix run_tests

`zkvm` is single-threaded, similar to `emscripten` and `wasm`. The `cfg` for `zkvm` seems to have been dropped. This PR adds the `cfg` again.
Diffstat (limited to 'library/test')
-rw-r--r--library/test/src/lib.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/library/test/src/lib.rs b/library/test/src/lib.rs
index f3a26e25938..7bd08a0605f 100644
--- a/library/test/src/lib.rs
+++ b/library/test/src/lib.rs
@@ -589,7 +589,9 @@ pub fn run_test(
             // If the platform is single-threaded we're just going to run
             // the test synchronously, regardless of the concurrency
             // level.
-            let supports_threads = !cfg!(target_os = "emscripten") && !cfg!(target_family = "wasm");
+            let supports_threads = !cfg!(target_os = "emscripten")
+                && !cfg!(target_family = "wasm")
+                && !cfg!(target_os = "zkvm");
             if supports_threads {
                 let cfg = thread::Builder::new().name(name.as_slice().to_owned());
                 let mut runtest = Arc::new(Mutex::new(Some(runtest)));