@@ -3466,7 +3466,14 @@ class PackageCommandTestCase: CommandsBuildProviderTestCase {
3466
3466
XCTAssertMatch ( stdout, . contains( " -DEXTRA_SWIFT_FLAG " ) )
3467
3467
XCTAssertMatch ( stdout, . contains( " Build of product 'MyExecutable' complete! " ) )
3468
3468
XCTAssertMatch ( stdout, . contains( " succeeded: true " ) )
3469
- XCTAssertMatch ( stdout, . and( . contains( " artifact-path: " ) , . contains( RelativePath ( " debug/MyExecutable " ) . pathString) ) )
3469
+ switch buildSystemProvider {
3470
+ case . native:
3471
+ XCTAssertMatch ( stdout, . and( . contains( " artifact-path: " ) , . contains( RelativePath ( " debug/MyExecutable " ) . pathString) ) )
3472
+ case . swiftbuild:
3473
+ XCTAssertMatch ( stdout, . and( . contains( " artifact-path: " ) , . contains( RelativePath ( " MyExecutable " ) . pathString) ) )
3474
+ case . xcode:
3475
+ XCTFail ( " unimplemented assertion for --build-system xcode " )
3476
+ }
3470
3477
XCTAssertMatch ( stdout, . and( . contains( " artifact-kind: " ) , . contains( " executable " ) ) )
3471
3478
}
3472
3479
@@ -3478,7 +3485,14 @@ class PackageCommandTestCase: CommandsBuildProviderTestCase {
3478
3485
XCTAssertNoMatch ( stdout, . contains( " -module-name MyExecutable " ) )
3479
3486
XCTAssertMatch ( stdout, . contains( " Build of product 'MyExecutable' complete! " ) )
3480
3487
XCTAssertMatch ( stdout, . contains( " succeeded: true " ) )
3481
- XCTAssertMatch ( stdout, . and( . contains( " artifact-path: " ) , . contains( RelativePath ( " release/MyExecutable " ) . pathString) ) )
3488
+ switch buildSystemProvider {
3489
+ case . native:
3490
+ XCTAssertMatch ( stdout, . and( . contains( " artifact-path: " ) , . contains( RelativePath ( " release/MyExecutable " ) . pathString) ) )
3491
+ case . swiftbuild:
3492
+ XCTAssertMatch ( stdout, . and( . contains( " artifact-path: " ) , . contains( RelativePath ( " MyExecutable " ) . pathString) ) )
3493
+ case . xcode:
3494
+ XCTFail ( " unimplemented assertion for --build-system xcode " )
3495
+ }
3482
3496
XCTAssertMatch ( stdout, . and( . contains( " artifact-kind: " ) , . contains( " executable " ) ) )
3483
3497
}
3484
3498
@@ -3490,7 +3504,14 @@ class PackageCommandTestCase: CommandsBuildProviderTestCase {
3490
3504
XCTAssertNoMatch ( stdout, . contains( " -module-name MyLibrary " ) )
3491
3505
XCTAssertMatch ( stdout, . contains( " Build of product 'MyStaticLibrary' complete! " ) )
3492
3506
XCTAssertMatch ( stdout, . contains( " succeeded: true " ) )
3493
- XCTAssertMatch ( stdout, . and( . contains( " artifact-path: " ) , . contains( RelativePath ( " release/libMyStaticLibrary " ) . pathString) ) )
3507
+ switch buildSystemProvider {
3508
+ case . native:
3509
+ XCTAssertMatch ( stdout, . and( . contains( " artifact-path: " ) , . contains( RelativePath ( " release/libMyStaticLibrary " ) . pathString) ) )
3510
+ case . swiftbuild:
3511
+ XCTAssertMatch ( stdout, . and( . contains( " artifact-path: " ) , . contains( RelativePath ( " MyStaticLibrary " ) . pathString) ) )
3512
+ case . xcode:
3513
+ XCTFail ( " unimplemented assertion for --build-system xcode " )
3514
+ }
3494
3515
XCTAssertMatch ( stdout, . and( . contains( " artifact-kind: " ) , . contains( " staticLibrary " ) ) )
3495
3516
}
3496
3517
@@ -3502,11 +3523,18 @@ class PackageCommandTestCase: CommandsBuildProviderTestCase {
3502
3523
XCTAssertNoMatch ( stdout, . contains( " -module-name MyLibrary " ) )
3503
3524
XCTAssertMatch ( stdout, . contains( " Build of product 'MyDynamicLibrary' complete! " ) )
3504
3525
XCTAssertMatch ( stdout, . contains( " succeeded: true " ) )
3505
- #if os(Windows)
3506
- XCTAssertMatch ( stdout, . and( . contains( " artifact-path: " ) , . contains( " release \\ MyDynamicLibrary " ) ) )
3507
- #else
3508
- XCTAssertMatch ( stdout, . and( . contains( " artifact-path: " ) , . contains( " release/libMyDynamicLibrary " ) ) )
3509
- #endif
3526
+ switch buildSystemProvider {
3527
+ case . native:
3528
+ #if os(Windows)
3529
+ XCTAssertMatch ( stdout, . and( . contains( " artifact-path: " ) , . contains( RelativePath ( " release/MyDynamicLibrary.dll " ) . pathString) ) )
3530
+ #else
3531
+ XCTAssertMatch ( stdout, . and( . contains( " artifact-path: " ) , . contains( RelativePath ( " release/libMyDynamicLibrary " ) . pathString) ) )
3532
+ #endif
3533
+ case . swiftbuild:
3534
+ XCTAssertMatch ( stdout, . and( . contains( " artifact-path: " ) , . contains( RelativePath ( " MyDynamicLibrary " ) . pathString) ) )
3535
+ case . xcode:
3536
+ XCTFail ( " unimplemented assertion for --build-system xcode " )
3537
+ }
3510
3538
XCTAssertMatch ( stdout, . and( . contains( " artifact-kind: " ) , . contains( " dynamicLibrary " ) ) )
3511
3539
}
3512
3540
}
@@ -4069,10 +4097,7 @@ class PackageCommandSwiftBuildTests: PackageCommandTestCase {
4069
4097
override func testNoParameters( ) async throws {
4070
4098
try await super. testNoParameters ( )
4071
4099
}
4072
-
4073
- override func testCommandPluginBuildingCallbacks( ) async throws {
4074
- throw XCTSkip ( " SWBINTTODO: Test fails because plugin is not producing expected output to stdout. " )
4075
- }
4100
+
4076
4101
override func testCommandPluginBuildTestability( ) async throws {
4077
4102
throw XCTSkip ( " SWBINTTODO: Test fails as plugins are not currenty supported " )
4078
4103
}
0 commit comments