Skip to content

Commit 38d9d2a

Browse files
committed
Fix tests
1 parent fea533d commit 38d9d2a

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

Tests/SWBTaskConstructionTests/XCFrameworkTaskConstructionTests.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ fileprivate struct XCFrameworkTaskConstructionTests: CoreBasedTests {
7878
try await tester.checkBuild(BuildParameters(action: .build, configuration: "Debug"), runDestination: .macOS, fs: fs) { results in
7979
var processSupportXCFrameworkTask: (any PlannedTask)?
8080
results.checkTask(.matchRuleType("ProcessXCFramework")) { task in
81-
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Support.xcframework", "--platform", "macos", "--library-identifier", "x86_64-apple-macos\(core.loadSDK(.macOS).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Debug"])
81+
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Support.xcframework", "--platform", "macos", "--library-identifier", "arm64-apple-macos\(core.loadSDK(.macOS).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Debug"])
8282
task.checkInputs([
8383
.path("\(SRCROOT)/Support.xcframework"),
8484
.path("\(SRCROOT)/build/Debug")
@@ -189,7 +189,7 @@ fileprivate struct XCFrameworkTaskConstructionTests: CoreBasedTests {
189189

190190
var processSupportXCFrameworkTask: (any PlannedTask)?
191191
results.checkTask(.matchRule(["ProcessXCFramework", "\(SRCROOT)/Support.xcframework", "\(SRCROOT)/build/Debug/Support.framework", "macos"])) { task in
192-
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Support.xcframework", "--platform", "macos", "--library-identifier", "x86_64-apple-macos\(core.loadSDK(.macOS).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Debug"])
192+
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Support.xcframework", "--platform", "macos", "--library-identifier", "arm64-apple-macos\(core.loadSDK(.macOS).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Debug"])
193193
task.checkInputs([
194194
.path("\(SRCROOT)/Support.xcframework"),
195195
.path("\(SRCROOT)/build/Debug")
@@ -224,7 +224,7 @@ fileprivate struct XCFrameworkTaskConstructionTests: CoreBasedTests {
224224

225225
var processSupportXCFrameworkTask: (any PlannedTask)?
226226
results.checkTask(.matchRule(["ProcessXCFramework", "\(SRCROOT)/Support.xcframework", "\(SRCROOT)/build/Debug-driverkit/Support.framework", "driverkit"])) { task in
227-
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Support.xcframework", "--platform", "driverkit", "--library-identifier", "x86_64-apple-driverkit\(core.loadSDK(.driverKit).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Debug-driverkit"])
227+
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Support.xcframework", "--platform", "driverkit", "--library-identifier", "arm64-apple-driverkit\(core.loadSDK(.driverKit).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Debug-driverkit"])
228228
task.checkInputs([
229229
.path("\(SRCROOT)/Support.xcframework"),
230230
.path("\(SRCROOT)/build/Debug-driverkit")
@@ -318,7 +318,7 @@ fileprivate struct XCFrameworkTaskConstructionTests: CoreBasedTests {
318318
try await tester.checkBuild(BuildParameters(action: .install, configuration: "Release"), runDestination: .macOS, fs: fs) { results in
319319
var processSupportXCFrameworkTask: (any PlannedTask)?
320320
results.checkTask(.matchRuleType("ProcessXCFramework")) { task in
321-
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Support.xcframework", "--platform", "macos", "--library-identifier", "x86_64-apple-macos\(core.loadSDK(.macOS).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Release"])
321+
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Support.xcframework", "--platform", "macos", "--library-identifier", "arm64-apple-macos\(core.loadSDK(.macOS).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Release"])
322322
task.checkInputs([
323323
.path("\(SRCROOT)/Support.xcframework"),
324324
.path("\(SRCROOT)/build/Release")
@@ -413,7 +413,7 @@ fileprivate struct XCFrameworkTaskConstructionTests: CoreBasedTests {
413413
try await tester.checkBuild(BuildParameters(action: .build, configuration: "Debug"), runDestination: .macOS, fs: fs) { results in
414414
var processSupportXCFrameworkTask: (any PlannedTask)?
415415
results.checkTask(.matchRuleType("ProcessXCFramework")) { task in
416-
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Support.xcframework", "--platform", "macos", "--library-identifier", "x86_64-apple-macos\(core.loadSDK(.macOS).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Debug"])
416+
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Support.xcframework", "--platform", "macos", "--library-identifier", "arm64-apple-macos\(core.loadSDK(.macOS).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Debug"])
417417
task.checkInputs([
418418
.path("\(SRCROOT)/Support.xcframework"),
419419
.path("\(SRCROOT)/build/Debug")
@@ -553,7 +553,7 @@ fileprivate struct XCFrameworkTaskConstructionTests: CoreBasedTests {
553553

554554
await tester.checkBuild(BuildParameters(action: .build, configuration: "Debug"), runDestination: .macOS, fs: fs) { results in
555555
results.checkTask(.matchRule(["ProcessXCFramework", "\(SRCROOT)/Support.xcframework", "\(SRCROOT)/build/Debug/Support.framework", "macos"])) { task in
556-
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Support.xcframework", "--platform", "macos", "--library-identifier", "x86_64-apple-macos\(core.loadSDK(.macOS).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Debug"])
556+
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Support.xcframework", "--platform", "macos", "--library-identifier", "arm64-apple-macos\(core.loadSDK(.macOS).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Debug"])
557557
task.checkInputs([
558558
.path("\(SRCROOT)/Support.xcframework"),
559559
.path("\(SRCROOT)/build/Debug")
@@ -625,7 +625,7 @@ fileprivate struct XCFrameworkTaskConstructionTests: CoreBasedTests {
625625
try await tester.checkBuild(BuildParameters(action: .build, configuration: "Debug"), runDestination: .macOS, fs: fs) { results in
626626
var processSupportXCFrameworkTask: (any PlannedTask)?
627627
results.checkTask(.matchRuleType("ProcessXCFramework")) { task in
628-
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Support.xcframework", "--platform", "macos", "--library-identifier", "x86_64-apple-macos\(core.loadSDK(.macOS).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Debug"])
628+
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Support.xcframework", "--platform", "macos", "--library-identifier", "arm64-apple-macos\(core.loadSDK(.macOS).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Debug"])
629629
task.checkInputs([
630630
.path("\(SRCROOT)/Support.xcframework"),
631631
.path("\(SRCROOT)/build/Debug")
@@ -726,7 +726,7 @@ fileprivate struct XCFrameworkTaskConstructionTests: CoreBasedTests {
726726
try await tester.checkBuild(BuildParameters(action: .build, configuration: "Debug"), runDestination: .macOS, fs: fs) { results in
727727
var processSupportXCFrameworkTask: (any PlannedTask)?
728728
results.checkTask(.matchRuleType("ProcessXCFramework")) { task in
729-
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Support.xcframework", "--platform", "macos", "--library-identifier", "x86_64-apple-macos\(core.loadSDK(.macOS).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Debug"])
729+
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Support.xcframework", "--platform", "macos", "--library-identifier", "arm64-apple-macos\(core.loadSDK(.macOS).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Debug"])
730730
task.checkInputs([
731731
.path("\(SRCROOT)/Support.xcframework"),
732732
.path("\(SRCROOT)/build/Debug")
@@ -1114,7 +1114,7 @@ fileprivate struct XCFrameworkTaskConstructionTests: CoreBasedTests {
11141114
try await tester.checkBuild(BuildParameters(action: .build, configuration: "Debug"), runDestination: .macOS, fs: fs) { results in
11151115
var processSupportXCFrameworkTask: (any PlannedTask)?
11161116
results.checkTask(.matchRule(["ProcessXCFramework", "\(SRCROOT)/Support.xcframework", "\(SRCROOT)/build/Debug/Support.framework", "macos"])) { task in
1117-
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Support.xcframework", "--platform", "macos", "--library-identifier", "x86_64-apple-macos\(core.loadSDK(.macOS).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Debug"])
1117+
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Support.xcframework", "--platform", "macos", "--library-identifier", "arm64-apple-macos\(core.loadSDK(.macOS).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Debug"])
11181118
task.checkInputs([
11191119
.path("\(SRCROOT)/Support.xcframework"),
11201120
.path("\(SRCROOT)/build/Debug")
@@ -1129,7 +1129,7 @@ fileprivate struct XCFrameworkTaskConstructionTests: CoreBasedTests {
11291129

11301130
var processExtrasXCFrameworkTask: (any PlannedTask)?
11311131
results.checkTask(.matchRule(["ProcessXCFramework", "\(SRCROOT)/Extras.xcframework", "\(SRCROOT)/build/Debug/Extras.framework", "macos"])) { task in
1132-
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Extras.xcframework", "--platform", "macos", "--library-identifier", "x86_64-apple-macos\(core.loadSDK(.macOS).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Debug"])
1132+
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Extras.xcframework", "--platform", "macos", "--library-identifier", "arm64-apple-macos\(core.loadSDK(.macOS).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Debug"])
11331133
task.checkInputs([
11341134
.path("\(SRCROOT)/Extras.xcframework"),
11351135
.path("\(SRCROOT)/build/Debug")
@@ -1178,7 +1178,7 @@ fileprivate struct XCFrameworkTaskConstructionTests: CoreBasedTests {
11781178
try results.checkTarget("App2") { target in
11791179
var processSupportXCFrameworkTask: (any PlannedTask)?
11801180
results.checkTask(.matchRule(["ProcessXCFramework", "\(SRCROOT)/Support.xcframework", "\(SRCROOT)/build/Debug/Support.framework", "macos"])) { task in
1181-
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Support.xcframework", "--platform", "macos", "--library-identifier", "x86_64-apple-macos\(core.loadSDK(.macOS).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Debug"])
1181+
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Support.xcframework", "--platform", "macos", "--library-identifier", "arm64-apple-macos\(core.loadSDK(.macOS).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Debug"])
11821182
task.checkInputs([
11831183
.path("\(SRCROOT)/Support.xcframework"),
11841184
.path("\(SRCROOT)/build/Debug")
@@ -1193,7 +1193,7 @@ fileprivate struct XCFrameworkTaskConstructionTests: CoreBasedTests {
11931193

11941194
var processExtrasXCFrameworkTask: (any PlannedTask)?
11951195
results.checkTask(.matchRule(["ProcessXCFramework", "\(SRCROOT)/Extras.xcframework", "\(SRCROOT)/build/Debug/Extras.framework", "macos"])) { task in
1196-
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Extras.xcframework", "--platform", "macos", "--library-identifier", "x86_64-apple-macos\(core.loadSDK(.macOS).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Debug"])
1196+
task.checkCommandLine(["builtin-process-xcframework", "--xcframework", "\(SRCROOT)/Extras.xcframework", "--platform", "macos", "--library-identifier", "arm64-apple-macos\(core.loadSDK(.macOS).defaultDeploymentTarget)", "--target-path", "\(SRCROOT)/build/Debug"])
11971197
task.checkInputs([
11981198
.path("\(SRCROOT)/Extras.xcframework"),
11991199
.path("\(SRCROOT)/build/Debug")

Tests/SWBTaskExecutionTests/ProcessXCFrameworkLibraryTaskActionTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fileprivate struct ProcessXCFrameworkLibraryTaskActionTests: CoreBasedTests {
4747

4848
try fs.createDirectory(Path("\(DSTROOT)"), recursive: true)
4949

50-
let task = Task(forTarget: nil, ruleInfo: [], commandLine: ["<arg_skipp>", "--xcframework", supportXCFrameworkPath.str, "--platform", "macos", "--target-path", DSTROOT], workingDirectory: Path(DSTROOT), action: ProcessXCFrameworkTaskAction())
50+
let task = Task(forTarget: nil, ruleInfo: [], commandLine: ["<arg_skipp>", "--xcframework", supportXCFrameworkPath.str, "--platform", "macos", "--library-identifier", "x86_64-apple-macos10.15", "--target-path", DSTROOT], workingDirectory: Path(DSTROOT), action: ProcessXCFrameworkTaskAction())
5151
guard let result = await task.action?.performTaskAction(task, dynamicExecutionDelegate: MockDynamicTaskExecutionDelegate(), executionDelegate: executionDelegate, clientDelegate: MockTaskExecutionClientDelegate(), outputDelegate: outputDelegate) else {
5252
Issue.record("No result was returned.")
5353
return
@@ -92,7 +92,7 @@ fileprivate struct ProcessXCFrameworkLibraryTaskActionTests: CoreBasedTests {
9292

9393
try fs.createDirectory(Path("\(DSTROOT)"), recursive: true)
9494

95-
let task = Task(forTarget: nil, ruleInfo: [], commandLine: ["<arg_skipp>", "--xcframework", supportXCFrameworkPath.str, "--platform", "macos", "--target-path", DSTROOT], workingDirectory: Path(DSTROOT), action: ProcessXCFrameworkTaskAction())
95+
let task = Task(forTarget: nil, ruleInfo: [], commandLine: ["<arg_skipp>", "--xcframework", supportXCFrameworkPath.str, "--platform", "macos", "--library-identifier", "x86_64-apple-macos10.15", "--target-path", DSTROOT], workingDirectory: Path(DSTROOT), action: ProcessXCFrameworkTaskAction())
9696
guard let result = await task.action?.performTaskAction(task, dynamicExecutionDelegate: MockDynamicTaskExecutionDelegate(), executionDelegate: executionDelegate, clientDelegate: MockTaskExecutionClientDelegate(), outputDelegate: outputDelegate) else {
9797
Issue.record("No result was returned.")
9898
return
@@ -183,7 +183,7 @@ fileprivate struct ProcessXCFrameworkLibraryTaskActionTests: CoreBasedTests {
183183
let expectedLibraryPath = supportXCFrameworkPath.join("x86_64-apple-macos10.15/Support.framework")
184184
try fs.removeDirectory(expectedLibraryPath)
185185

186-
let task = Task(forTarget: nil, ruleInfo: [], commandLine: ["<arg_skipp>", "--xcframework", supportXCFrameworkPath.str, "--platform", "macos", "--target-path", DSTROOT], workingDirectory: Path(DSTROOT), action: ProcessXCFrameworkTaskAction())
186+
let task = Task(forTarget: nil, ruleInfo: [], commandLine: ["<arg_skipp>", "--xcframework", supportXCFrameworkPath.str, "--platform", "macos", "--library-identifier", "x86_64-apple-macos10.15", "--target-path", DSTROOT], workingDirectory: Path(DSTROOT), action: ProcessXCFrameworkTaskAction())
187187
guard let result = await task.action?.performTaskAction(task, dynamicExecutionDelegate: MockDynamicTaskExecutionDelegate(), executionDelegate: executionDelegate, clientDelegate: MockTaskExecutionClientDelegate(), outputDelegate: outputDelegate) else {
188188
Issue.record("No result was returned.")
189189
return

0 commit comments

Comments
 (0)