Skip to content

Commit 6831977

Browse files
Rollup merge of rust-lang#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.
2 parents 93ca906 + dde17cf commit 6831977

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

library/test/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,9 @@ pub fn run_test(
589589
// If the platform is single-threaded we're just going to run
590590
// the test synchronously, regardless of the concurrency
591591
// level.
592-
let supports_threads = !cfg!(target_os = "emscripten") && !cfg!(target_family = "wasm");
592+
let supports_threads = !cfg!(target_os = "emscripten")
593+
&& !cfg!(target_family = "wasm")
594+
&& !cfg!(target_os = "zkvm");
593595
if supports_threads {
594596
let cfg = thread::Builder::new().name(name.as_slice().to_owned());
595597
let mut runtest = Arc::new(Mutex::new(Some(runtest)));

0 commit comments

Comments
 (0)