Skip to content

Commit

Permalink
Rollup merge of rust-lang#124681 - risc0:erik/fix-test, r=joboet
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
compiler-errors authored May 4, 2024
2 parents ec4b2f3 + dde17cf commit d7c07eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion library/test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
Expand Down

0 comments on commit d7c07eb

Please sign in to comment.