Skip to content

Commit a824afb

Browse files
committed
Tests: correct -sdk parameter for Windows
A copy-paste error was accidentally introduced in the attempt to get the full test suite running on Windows (even though it did not pass). This corrects that mistake.
1 parent 96e45c8 commit a824afb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Tests/SwiftDriverTests/JobExecutorTests.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,8 +449,11 @@ final class JobExecutorTests: XCTestCase {
449449
let toolchain = DarwinToolchain(env: ProcessEnv.vars, executor: executor)
450450
return try ["-sdk", toolchain.sdk.get().pathString]
451451
#elseif os(Windows)
452-
let toolchain = DarwinToolchain(env: ProcessEnv.vars, executor: executor)
453-
return try ["-sdk", toolchain.sdk.get().pathString]
452+
let toolchain = WindowsToolchain(env: ProcessEnv.vars, executor: executor)
453+
if let path = try toolchain.defaultSDKPath(nil) {
454+
return ["-sdk", path.pathString.nativePathString()]
455+
}
456+
return []
454457
#else
455458
return []
456459
#endif

0 commit comments

Comments
 (0)