Skip to content

Commit 0d37c46

Browse files
authored
TSCTestSupport: SDKROOT is required for Windows (#319)
The `SDKROOT` environment variable is used to compute the default value for the `-sdk` parameter to the swift compiler which is required to locate the standard library. Do not filter the environment variable on Windows as that will prevent the SPM test suite from succeeding.
1 parent 332afc8 commit 0d37c46

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/TSCTestSupport/Product.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ extension Product {
9696
// FIXME: We use this private environment variable hack to be able to
9797
// create special conditions in swift-build for swiftpm tests.
9898
environment["SWIFTPM_TESTS_MODULECACHE"] = self.path.parentDirectory.pathString
99+
#if !os(Windows)
99100
environment["SDKROOT"] = nil
101+
#endif
100102

101103
// Unset the internal env variable that allows skipping certain tests.
102104
environment["_SWIFTPM_SKIP_TESTS_LIST"] = nil

0 commit comments

Comments
 (0)