Skip to content

Commit ffb4eb7

Browse files
authored
Merge pull request #884 from compnerd/signalling
SwiftDriverTests: conditionalise `exitStatus`
2 parents 2aeeb0c + 7507bf9 commit ffb4eb7

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)