Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 89c3619

Browse files
committed
Force single thread mode for libtest
1 parent dbac219 commit 89c3619

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
From e275a6ac96bedda2d57296914f2bb736e1e4154c Mon Sep 17 00:00:00 2001
2+
From: bjorn3 <[email protected]>
3+
Date: Fri, 9 Aug 2019 13:16:55 +0200
4+
Subject: [PATCH] [test] Force single thread mode
5+
6+
---
7+
src/libtest/lib.rs | 11 +----------
8+
1 file changed, 1 insertion(+), 10 deletions(-)
9+
10+
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs
11+
index 8d74d9a..c7a3c23 100644
12+
--- a/src/libtest/lib.rs
13+
+++ b/src/libtest/lib.rs
14+
@@ -1419,16 +1419,7 @@ pub fn run_test(
15+
.unwrap();
16+
};
17+
18+
- // If the platform is single-threaded we're just going to run
19+
- // the test synchronously, regardless of the concurrency
20+
- // level.
21+
- let supports_threads = !cfg!(target_os = "emscripten") && !cfg!(target_arch = "wasm32");
22+
- if concurrency == Concurrent::Yes && supports_threads {
23+
- let cfg = thread::Builder::new().name(name.as_slice().to_owned());
24+
- cfg.spawn(runtest).unwrap();
25+
- } else {
26+
- runtest();
27+
- }
28+
+ runtest();
29+
}
30+
31+
match testfn {
32+
--
33+
2.20.1
34+

0 commit comments

Comments
 (0)