Skip to content

Commit 8cc42e9

Browse files
committed
WatchKitTests.watchBackDeploymentArtifacts(): Make the check for the build version in arm64/arm64e slices in the WatchKit stub binary more permissive
Also tidy up the logic of these checks since they all are implicitly assuming a single build version per arch, and that's also needed to use the >= comparison. rdar://152870849
1 parent 22ccb4e commit 8cc42e9

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Tests/SWBBuildSystemTests/WatchKitTests.swift

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,18 @@ fileprivate struct WatchKitTests: CoreBasedTests {
125125
// Check expected deployment target
126126
for slice in try macho.slices() {
127127
let buildVersions = try Set(slice.buildVersions().map { $0.minOSVersion })
128+
guard let buildVersion = buildVersions.only else {
129+
let buildVersionsString = buildVersions.compactMap({ $0.description }).sorted().joined(separator: " ")
130+
Issue.record("Expected one build version for architecture \(slice.arch) but found '\(buildVersionsString)'")
131+
continue
132+
}
128133
switch slice.arch {
129134
case "armv7k", "arm64_32", "x86_64":
130-
#expect(buildVersions == [Version(2)])
135+
#expect(buildVersion == Version(2))
131136
case "arm64" where sdkPath.str.contains("WatchSimulator"):
132-
#expect(buildVersions == [Version(7)])
137+
#expect(buildVersion == Version(7))
133138
case "arm64", "arm64e":
134-
#expect(buildVersions == [Version(9)])
139+
#expect(buildVersion >= Version(9))
135140
case "i386":
136141
break
137142
default:

0 commit comments

Comments
 (0)