Skip to content

Commit a98bf52

Browse files
committed
Update the deployment target for the legacy WatchKit Extension target in WatchTaskConstructionTests.watchOSAppBasics() as 4.0 is not really supported anymore, but 5.0 is.
Also add a comment explaining what is being tested with this old deployment target. rdar://158619806
1 parent 72e9dc7 commit a98bf52

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Tests/SWBTaskConstructionTests/WatchTaskConstructionTests.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ fileprivate struct WatchTaskConstructionTests: CoreBasedTests {
172172
"SKIP_INSTALL": "YES",
173173
"SWIFT_VERSION": swiftVersion,
174174
"TARGETED_DEVICE_FAMILY": "4",
175-
"WATCHOS_DEPLOYMENT_TARGET": "4.0",
175+
"WATCHOS_DEPLOYMENT_TARGET": "5.0",
176176
]),
177177
],
178178
buildPhases: [
@@ -311,12 +311,13 @@ fileprivate struct WatchTaskConstructionTests: CoreBasedTests {
311311
results.checkTask(.matchTarget(target), .matchRuleType("Ld")) { task in
312312
let expectedCommandLine: [String] = [
313313
["clang"],
314-
["-target", "arm64_32-apple-watchos4.0"],
314+
["-target", "arm64_32-apple-watchos5.0"],
315315
["-isysroot", core.loadSDK(.watchOS).path.str, "-Xlinker", "-rpath", "-Xlinker", "@executable_path/Frameworks", "-Xlinker", "-rpath", "-Xlinker", "@executable_path/../../Frameworks"],
316316
["-fapplication-extension", "\(SRCROOT)/build/Debug-watchos/Watchable WatchKit Extension (old).appex/Watchable WatchKit Extension (old)"]
317317
].reduce([], +)
318318
task.checkCommandLineContains(expectedCommandLine)
319319
task.checkCommandLineContainsUninterrupted(["-e", "_WKExtensionMain"])
320+
// This option gets added if the deployment target is 5.3 or older and the architecture is armv7k or arm64_32. This is managed through build setting interpolation logic in the com.apple.product-type.watchkit2-extension product type.
320321
task.checkCommandLineContainsUninterrupted(["-lWKExtensionMainLegacy"])
321322
task.checkCommandLineContainsUninterrupted(["-framework", "WatchKit"])
322323
}

0 commit comments

Comments
 (0)