Skip to content

Commit d9750b0

Browse files
committed
[test] Set SDKROOT: auto at project level for withHostToolsPackages
This better matches what we actually generate for packages. Also set all available platforms as supported.
1 parent 209579f commit d9750b0

File tree

1 file changed

+10
-43
lines changed

1 file changed

+10
-43
lines changed

Tests/SWBBuildSystemTests/HostBuildToolBuildOperationTests.swift

Lines changed: 10 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -176,16 +176,15 @@ fileprivate struct HostBuildToolBuildOperationTests: CoreBasedTests {
176176
"GENERATE_INFOPLIST_FILE": "YES",
177177
"PRODUCT_NAME": "$(TARGET_NAME)",
178178
"CODE_SIGNING_ALLOWED": "NO",
179+
"SDKROOT": "auto",
180+
"SUPPORTED_PLATFORMS": "$(AVAILABLE_PLATFORMS)",
179181
]),
180182
],
181183
targets: [
182184
TestStandardTarget("TransitivePackageDep", type: .objectFile, buildConfigurations: [
183185
TestBuildConfiguration(
184186
"Debug",
185-
buildSettings: [
186-
"SDKROOT": "auto",
187-
"SUPPORTED_PLATFORMS": "macosx iphoneos iphonesimulator",
188-
],
187+
buildSettings: [:],
189188
impartedBuildProperties:
190189
TestImpartedBuildProperties(
191190
buildSettings: [
@@ -195,14 +194,7 @@ fileprivate struct HostBuildToolBuildOperationTests: CoreBasedTests {
195194
], buildPhases: [
196195
TestSourcesBuildPhase(["transitivedep.swift"])
197196
]),
198-
TestStandardTarget("PackageDep", type: .staticLibrary, buildConfigurations: [
199-
TestBuildConfiguration(
200-
"Debug",
201-
buildSettings: [
202-
"SDKROOT": "auto",
203-
"SUPPORTED_PLATFORMS": "macosx iphoneos iphonesimulator",
204-
]),
205-
], buildPhases: [
197+
TestStandardTarget("PackageDep", type: .staticLibrary, buildPhases: [
206198
TestSourcesBuildPhase(["dep.swift"]),
207199
TestFrameworksBuildPhase([
208200
TestBuildFile(.target("TransitivePackageDep"))
@@ -214,14 +206,7 @@ fileprivate struct HostBuildToolBuildOperationTests: CoreBasedTests {
214206
TestFrameworksBuildPhase([
215207
TestBuildFile(.target("PackageDep")),
216208
]
217-
), buildConfigurations: [
218-
TestBuildConfiguration(
219-
"Debug",
220-
buildSettings: [
221-
"SDKROOT": "auto",
222-
"SUPPORTED_PLATFORMS": "macosx iphoneos iphonesimulator",
223-
]),
224-
], dependencies: [
209+
), dependencies: [
225210
"PackageDep"
226211
]),
227212
])
@@ -240,43 +225,25 @@ fileprivate struct HostBuildToolBuildOperationTests: CoreBasedTests {
240225
"GENERATE_INFOPLIST_FILE": "YES",
241226
"PRODUCT_NAME": "$(TARGET_NAME)",
242227
"CODE_SIGNING_ALLOWED": "NO",
228+
"SDKROOT": "auto",
229+
"SUPPORTED_PLATFORMS": "$(AVAILABLE_PLATFORMS)",
243230
]),
244231
],
245232
targets: [
246-
TestStandardTarget("HostTool", type: .hostBuildTool, buildConfigurations: [
247-
TestBuildConfiguration(
248-
"Debug",
249-
buildSettings: [
250-
"SDKROOT": "auto",
251-
])
252-
], buildPhases: [
233+
TestStandardTarget("HostTool", type: .hostBuildTool, buildPhases: [
253234
TestSourcesBuildPhase(["tool.swift"]),
254235
TestFrameworksBuildPhase([TestBuildFile(.target("PackageDepProduct"))])
255236
], dependencies: [
256237
"PackageDepProduct"
257238
]),
258-
TestStandardTarget("HostToolClientLib", type: .objectFile, buildConfigurations: [
259-
TestBuildConfiguration(
260-
"Debug",
261-
buildSettings: [
262-
"SDKROOT": "auto",
263-
"SUPPORTED_PLATFORMS": "macosx iphoneos iphonesimulator",
264-
]),
265-
], buildPhases: [
239+
TestStandardTarget("HostToolClientLib", type: .objectFile, buildPhases: [
266240
TestSourcesBuildPhase(["lib.swift"]),
267241
], dependencies: [
268242
"HostTool"
269243
]),
270244
TestPackageProductTarget("HostToolClientLibProduct", frameworksBuildPhase:
271245
TestFrameworksBuildPhase([TestBuildFile(.target("HostToolClientLib"))]
272-
), buildConfigurations: [
273-
TestBuildConfiguration(
274-
"Debug",
275-
buildSettings: [
276-
"SDKROOT": "auto",
277-
"SUPPORTED_PLATFORMS": "macosx iphoneos iphonesimulator",
278-
]),
279-
], dependencies: [
246+
), dependencies: [
280247
"HostToolClientLib"
281248
]),
282249
])

0 commit comments

Comments
 (0)