Skip to content

Commit 7507bf9

Browse files
committed
SwiftDriverTests: conditionalise exitStatus
Windows does not have a concept of signals. As such, we cannot have an exit status of `signalled`. This allows the test suite to build, though this test will currently fail.
1 parent 94ce9d1 commit 7507bf9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Tests/SwiftDriverTests/ParsableMessageTests.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,14 @@ final class ParsableMessageTests: XCTestCase {
297297
}
298298
// Now hijack the error stream and emit finished messages
299299
try withHijackedBufferedErrorStream(in: path) { errorBuffer in
300+
#if os(Windows)
301+
let status = ProcessResult.ExitStatus.terminated(code: 0)
302+
#else
303+
let status = ProcessResult.ExitStatus.signalled(signal: 9)
304+
#endif
300305
let resultSignalled = ProcessResult(arguments: args!,
301306
environment: ProcessEnv.vars,
302-
exitStatus: ProcessResult.ExitStatus.signalled(signal: 9),
307+
exitStatus: status,
303308
output: Result.success([]),
304309
stderrOutput: Result.success([]))
305310
// First emit the began messages

0 commit comments

Comments
 (0)