@@ -5603,40 +5603,26 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
5603
5603
let buildPath = result. plan. productsBuildPath
5604
5604
5605
5605
let fooTarget = try result. moduleBuildDescription ( for: " Foo " ) . swift ( ) . compileArguments ( )
5606
- #if os(macOS)
5607
5606
XCTAssertMatch (
5608
5607
fooTarget,
5609
5608
[
5610
5609
. anySequence,
5611
5610
" -emit-objc-header " ,
5612
- " -emit-objc-header-path " , " /path/to/build/ \( result. plan. destinationBuildParameters. triple) /debug/Foo.build/Foo-Swift.h " ,
5613
- . anySequence,
5614
- ]
5615
- )
5616
- #else
5617
- XCTAssertNoMatch (
5618
- fooTarget,
5619
- [
5620
- . anySequence,
5621
- " -emit-objc-header " ,
5622
- " -emit-objc-header-path " , " /path/to/build/ \( result. plan. destinationBuildParameters. triple) /Foo.build/Foo-Swift.h " ,
5611
+ " -emit-objc-header-path " ,
5612
+ " \( buildPath. appending ( components: " Foo.build " , " Foo-Swift.h " ) ) " ,
5623
5613
. anySequence,
5624
5614
]
5625
5615
)
5626
- #endif
5627
5616
5628
5617
let barTarget = try result. moduleBuildDescription ( for: " Bar " ) . clang ( ) . basicArguments ( isCXX: false )
5629
- #if os(macOS)
5630
5618
XCTAssertMatch (
5631
5619
barTarget,
5632
- [ . anySequence, " -fmodule-map-file=/path/to/build/ \( result. plan. destinationBuildParameters. triple) /debug/Foo.build/module.modulemap " , . anySequence]
5633
- )
5634
- #else
5635
- XCTAssertNoMatch (
5636
- barTarget,
5637
- [ . anySequence, " -fmodule-map-file=/path/to/build/ \( result. plan. destinationBuildParameters. triple) /debug/Foo.build/module.modulemap " , . anySequence]
5620
+ [
5621
+ . anySequence,
5622
+ " -fmodule-map-file= \( buildPath. appending ( components: " Foo.build " , " module.modulemap " ) ) " ,
5623
+ . anySequence,
5624
+ ]
5638
5625
)
5639
- #endif
5640
5626
5641
5627
let yaml = try fs. tempDirectory. appending ( components: UUID ( ) . uuidString, " debug.yaml " )
5642
5628
try fs. createDirectory ( yaml. parentDirectory, recursive: true )
@@ -5702,50 +5688,26 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
5702
5688
let buildPath = result. plan. productsBuildPath
5703
5689
5704
5690
let fooTarget = try result. moduleBuildDescription ( for: " Foo " ) . swift ( ) . compileArguments ( )
5705
- #if os(macOS)
5706
5691
XCTAssertMatch (
5707
5692
fooTarget,
5708
5693
[
5709
5694
. anySequence,
5710
5695
" -emit-objc-header " ,
5711
5696
" -emit-objc-header-path " ,
5712
- " /path/to/build/ \( result. plan. destinationBuildParameters. triple) /debug/Foo.build/Foo-Swift.h " ,
5713
- . anySequence,
5714
- ]
5715
- )
5716
- #else
5717
- XCTAssertNoMatch (
5718
- fooTarget,
5719
- [
5720
- . anySequence,
5721
- " -emit-objc-header " ,
5722
- " -emit-objc-header-path " ,
5723
- " /path/to/build/ \( result. plan. destinationBuildParameters. triple) /debug/Foo.build/Foo-Swift.h " ,
5697
+ " \( buildPath. appending ( components: " Foo.build " , " Foo-Swift.h " ) ) " ,
5724
5698
. anySequence,
5725
5699
]
5726
5700
)
5727
- #endif
5728
5701
5729
5702
let barTarget = try result. moduleBuildDescription ( for: " Bar " ) . clang ( ) . basicArguments ( isCXX: false )
5730
- #if os(macOS)
5731
5703
XCTAssertMatch (
5732
5704
barTarget,
5733
5705
[
5734
5706
. anySequence,
5735
- " -fmodule-map-file=/path/to/build/ \( result . plan . destinationBuildParameters . triple ) /debug/ Foo.build/ module.modulemap" ,
5707
+ " -fmodule-map-file= \( buildPath . appending ( components : " Foo.build " , " module.modulemap " ) ) " ,
5736
5708
. anySequence,
5737
5709
]
5738
5710
)
5739
- #else
5740
- XCTAssertNoMatch (
5741
- barTarget,
5742
- [
5743
- . anySequence,
5744
- " -fmodule-map-file=/path/to/build/ \( result. plan. destinationBuildParameters. triple) /debug/Foo.build/module.modulemap " ,
5745
- . anySequence,
5746
- ]
5747
- )
5748
- #endif
5749
5711
5750
5712
let yaml = try fs. tempDirectory. appending ( components: UUID ( ) . uuidString, " debug.yaml " )
5751
5713
try fs. createDirectory ( yaml. parentDirectory, recursive: true )
@@ -5813,54 +5775,29 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
5813
5775
let dynamicLibraryPrefix = " lib "
5814
5776
#endif
5815
5777
let result = try BuildPlanResult ( plan: plan)
5778
+ let buildPath = result. plan. productsBuildPath
5816
5779
5817
5780
let fooTarget = try result. moduleBuildDescription ( for: " Foo " ) . swift ( ) . compileArguments ( )
5818
- #if os(macOS)
5819
5781
XCTAssertMatch (
5820
5782
fooTarget,
5821
5783
[
5822
5784
. anySequence,
5823
5785
" -emit-objc-header " ,
5824
5786
" -emit-objc-header-path " ,
5825
- " /path/to/build/ \( result . plan . destinationBuildParameters . triple ) /debug/ Foo.build/ Foo-Swift.h" ,
5787
+ " \( buildPath . appending ( components : " Foo.build " , " Foo-Swift.h " ) ) " ,
5826
5788
. anySequence,
5827
5789
]
5828
5790
)
5829
- #else
5830
- XCTAssertNoMatch (
5831
- fooTarget,
5832
- [
5833
- . anySequence,
5834
- " -emit-objc-header " ,
5835
- " -emit-objc-header-path " ,
5836
- " /path/to/build/ \( result. plan. destinationBuildParameters. triple) /debug/Foo.build/Foo-Swift.h " ,
5837
- . anySequence,
5838
- ]
5839
- )
5840
- #endif
5841
5791
5842
5792
let barTarget = try result. moduleBuildDescription ( for: " Bar " ) . clang ( ) . basicArguments ( isCXX: false )
5843
- #if os(macOS)
5844
5793
XCTAssertMatch (
5845
5794
barTarget,
5846
5795
[
5847
5796
. anySequence,
5848
- " -fmodule-map-file=/path/to/build/ \( result . plan . destinationBuildParameters . triple ) /debug/ Foo.build/ module.modulemap" ,
5797
+ " -fmodule-map-file= \( buildPath . appending ( components : " Foo.build " , " module.modulemap " ) ) " ,
5849
5798
. anySequence,
5850
5799
]
5851
5800
)
5852
- #else
5853
- XCTAssertNoMatch (
5854
- barTarget,
5855
- [
5856
- . anySequence,
5857
- " -fmodule-map-file=/path/to/build/ \( result. plan. destinationBuildParameters. triple) /debug/Foo.build/module.modulemap " ,
5858
- . anySequence,
5859
- ]
5860
- )
5861
- #endif
5862
-
5863
- let buildPath = result. plan. productsBuildPath
5864
5801
5865
5802
let yaml = try fs. tempDirectory. appending ( components: UUID ( ) . uuidString, " debug.yaml " )
5866
5803
try fs. createDirectory ( yaml. parentDirectory, recursive: true )
0 commit comments