From 89c36194db0e9ed60986f8490e8a2820ddcf064c Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Fri, 9 Aug 2019 13:18:09 +0200 Subject: [PATCH] Force single thread mode for libtest --- .../0018-test-Force-single-thread-mode.patch | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 patches/0018-test-Force-single-thread-mode.patch diff --git a/patches/0018-test-Force-single-thread-mode.patch b/patches/0018-test-Force-single-thread-mode.patch new file mode 100644 index 00000000000..19cead46ff7 --- /dev/null +++ b/patches/0018-test-Force-single-thread-mode.patch @@ -0,0 +1,34 @@ +From e275a6ac96bedda2d57296914f2bb736e1e4154c Mon Sep 17 00:00:00 2001 +From: bjorn3 +Date: Fri, 9 Aug 2019 13:16:55 +0200 +Subject: [PATCH] [test] Force single thread mode + +--- + src/libtest/lib.rs | 11 +---------- + 1 file changed, 1 insertion(+), 10 deletions(-) + +diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs +index 8d74d9a..c7a3c23 100644 +--- a/src/libtest/lib.rs ++++ b/src/libtest/lib.rs +@@ -1419,16 +1419,7 @@ pub fn run_test( + .unwrap(); + }; + +- // 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_arch = "wasm32"); +- if concurrency == Concurrent::Yes && supports_threads { +- let cfg = thread::Builder::new().name(name.as_slice().to_owned()); +- cfg.spawn(runtest).unwrap(); +- } else { +- runtest(); +- } ++ runtest(); + } + + match testfn { +-- +2.20.1 +