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.
This commit is contained in:
Michael Goulet 2024-05-03 23:34:24 -04:00 committed by GitHub
commit 683197701c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)));