Skip to content

Commit 0595178

Browse files
committed
Fix tests failing on Linux
1 parent 86d7010 commit 0595178

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/Run/CommandExecutor.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ class InteractiveTaskExecutor: TaskExecutor {
6363
let argv: [UnsafeMutablePointer<CChar>?] = commandParts.map{ $0.withCString(strdup) }
6464
defer { for case let arg? in argv { free(arg) } }
6565

66+
#if os(macOS)
6667
var childFDActions: posix_spawn_file_actions_t? = nil
68+
#else
69+
var childFDActions: posix_spawn_file_actions_t = posix_spawn_file_actions_t()
70+
#endif
6771
var outputPipe: [Int32] = [-1, -1]
6872

6973
posix_spawn_file_actions_init(&childFDActions)

Tests/RunTests/XCTestManifests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import XCTest
33
#if !os(macOS)
44
public func allTests() -> [XCTestCaseEntry] {
55
return [
6-
testCase(RunTests.allTests),
6+
testCase(RunnerTests.allTests),
77
]
88
}
9-
#endif
9+
#endif

0 commit comments

Comments
 (0)