File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
stdlib/private/StdlibUnittest Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ import Darwin
2424import Glibc
2525#elseif canImport(Musl)
2626import Musl
27+ #elseif os(WASI)
28+ import WASILibc
2729#elseif os(Windows)
2830import CRT
2931import WinSDK
@@ -37,6 +39,12 @@ import ObjectiveC
3739import _Concurrency
3840#endif
3941
42+ #if os(WASI)
43+ let platformSupportsChildProcesses = false
44+ #else
45+ let platformSupportsChildProcesses = true
46+ #endif
47+
4048extension String {
4149 /// Returns the lines in `self`.
4250 public var _lines : [ String ] {
@@ -1726,7 +1734,7 @@ public func runAllTests() {
17261734 if _isChildProcess {
17271735 _childProcess ( )
17281736 } else {
1729- var runTestsInProcess : Bool = false
1737+ var runTestsInProcess : Bool = !platformSupportsChildProcesses
17301738 var filter : String ?
17311739 var args = [ String] ( )
17321740 var i = 0
@@ -1796,7 +1804,7 @@ public func runAllTestsAsync() async {
17961804 if _isChildProcess {
17971805 await _childProcessAsync ( )
17981806 } else {
1799- var runTestsInProcess : Bool = false
1807+ var runTestsInProcess : Bool = !platformSupportsChildProcesses
18001808 var filter : String ?
18011809 var args = [ String] ( )
18021810 var i = 0
You can’t perform that action at this time.
0 commit comments