File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
stdlib/private/StdlibUnittest Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,12 @@ import WinSDK
35
35
import ObjectiveC
36
36
#endif
37
37
38
+ #if os(WASI)
39
+ let platformSupportSpawnChild = false
40
+ #else
41
+ let platformSupportSpawnChild = true
42
+ #endif
43
+
38
44
extension String {
39
45
/// Returns the lines in `self`.
40
46
public var _lines : [ String ] {
@@ -1690,12 +1696,7 @@ public func runAllTests() {
1690
1696
if _isChildProcess {
1691
1697
_childProcess ( )
1692
1698
} else {
1693
- #if os(WASI)
1694
- // WASI doesn't support child process
1695
- var runTestsInProcess : Bool = true
1696
- #else
1697
- var runTestsInProcess : Bool = false
1698
- #endif
1699
+ var runTestsInProcess : Bool = !platformSupportSpawnChild
1699
1700
var filter : String ?
1700
1701
var args = [ String] ( )
1701
1702
var i = 0
@@ -1765,7 +1766,7 @@ public func runAllTestsAsync() async {
1765
1766
if _isChildProcess {
1766
1767
await _childProcessAsync ( )
1767
1768
} else {
1768
- var runTestsInProcess : Bool = false
1769
+ var runTestsInProcess : Bool = !platformSupportSpawnChild
1769
1770
var filter : String ?
1770
1771
var args = [ String] ( )
1771
1772
var i = 0
You can’t perform that action at this time.
0 commit comments