@@ -275,6 +275,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
275
275
}
276
276
277
277
func testModuleDependencyBuildCommandUniqueDepFile( ) throws {
278
+ let ( stdlibPath, shimsPath, _, _) = try getDriverArtifactsForScanning ( )
278
279
try withTemporaryDirectory { path in
279
280
let source0 = path. appending ( component: " testModuleDependencyBuildCommandUniqueDepFile1.swift " )
280
281
let source1 = path. appending ( component: " testModuleDependencyBuildCommandUniqueDepFile2.swift " )
@@ -299,9 +300,10 @@ final class ExplicitModuleBuildTests: XCTestCase {
299
300
. appending ( component: " Swift " )
300
301
let sdkArgumentsForTesting = ( try ? Driver . sdkArgumentsForTesting ( ) ) ?? [ ]
301
302
var driver = try Driver ( args: [ " swiftc " ,
302
- " -target " , " x86_64-apple-macosx11.0 " ,
303
303
" -I " , cHeadersPath. nativePathString ( escaped: true ) ,
304
304
" -I " , swiftModuleInterfacesPath. nativePathString ( escaped: true ) ,
305
+ " -I " , stdlibPath. nativePathString ( escaped: true ) ,
306
+ " -I " , shimsPath. nativePathString ( escaped: true ) ,
305
307
" -explicit-module-build " ,
306
308
" -import-objc-header " , bridgingHeaderpath. nativePathString ( escaped: true ) ,
307
309
source0. nativePathString ( escaped: true ) ,
@@ -331,6 +333,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
331
333
/// Test generation of explicit module build jobs for dependency modules when the driver
332
334
/// is invoked with -explicit-module-build
333
335
func testBridgingHeaderDeps( ) throws {
336
+ let ( stdlibPath, shimsPath, _, _) = try getDriverArtifactsForScanning ( )
334
337
try withTemporaryDirectory { path in
335
338
let main = path. appending ( component: " testExplicitModuleBuildJobs.swift " )
336
339
try localFileSystem. writeFileContents ( main, bytes:
@@ -350,9 +353,10 @@ final class ExplicitModuleBuildTests: XCTestCase {
350
353
. appending ( component: " Swift " )
351
354
let sdkArgumentsForTesting = ( try ? Driver . sdkArgumentsForTesting ( ) ) ?? [ ]
352
355
var driver = try Driver ( args: [ " swiftc " ,
353
- " -target " , " x86_64-apple-macosx11.0 " ,
354
356
" -I " , cHeadersPath. nativePathString ( escaped: true ) ,
355
357
" -I " , swiftModuleInterfacesPath. nativePathString ( escaped: true ) ,
358
+ " -I " , stdlibPath. nativePathString ( escaped: true ) ,
359
+ " -I " , shimsPath. nativePathString ( escaped: true ) ,
356
360
" -explicit-module-build " ,
357
361
" -import-objc-header " , bridgingHeaderpath. nativePathString ( escaped: true ) ,
358
362
main. nativePathString ( escaped: true ) ] + sdkArgumentsForTesting)
@@ -492,6 +496,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
492
496
/// Test generation of explicit module build jobs for dependency modules when the driver
493
497
/// is invoked with -explicit-module-build
494
498
func testExplicitModuleBuildJobs( ) throws {
499
+ let ( stdlibPath, shimsPath, _, _) = try getDriverArtifactsForScanning ( )
495
500
try withTemporaryDirectory { path in
496
501
let main = path. appending ( component: " testExplicitModuleBuildJobs.swift " )
497
502
try localFileSystem. writeFileContents ( main, bytes:
@@ -512,9 +517,10 @@ final class ExplicitModuleBuildTests: XCTestCase {
512
517
. appending ( component: " Swift " )
513
518
let sdkArgumentsForTesting = ( try ? Driver . sdkArgumentsForTesting ( ) ) ?? [ ]
514
519
var driver = try Driver ( args: [ " swiftc " ,
515
- " -target " , " x86_64-apple-macosx11.0 " ,
516
520
" -I " , cHeadersPath. nativePathString ( escaped: true ) ,
517
521
" -I " , swiftModuleInterfacesPath. nativePathString ( escaped: true ) ,
522
+ " -I " , stdlibPath. nativePathString ( escaped: true ) ,
523
+ " -I " , shimsPath. nativePathString ( escaped: true ) ,
518
524
" -explicit-module-build " ,
519
525
" -import-objc-header " , bridgingHeaderpath. nativePathString ( escaped: true ) ,
520
526
main. nativePathString ( escaped: true ) ] + sdkArgumentsForTesting)
@@ -616,6 +622,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
616
622
/// Test generation of explicit module build jobs for dependency modules when the driver
617
623
/// is invoked with -explicit-module-build, -verify-emitted-module-interface and -enable-library-evolution.
618
624
func testExplicitModuleVerifyInterfaceJobs( ) throws {
625
+ let ( stdlibPath, shimsPath, _, _) = try getDriverArtifactsForScanning ( )
619
626
try withTemporaryDirectory { path in
620
627
let main = path. appending ( component: " testExplicitModuleVerifyInterfaceJobs.swift " )
621
628
try localFileSystem. writeFileContents ( main) {
@@ -632,9 +639,10 @@ final class ExplicitModuleBuildTests: XCTestCase {
632
639
let privateSwiftInterfacePath : AbsolutePath = path. appending ( component: " testExplicitModuleVerifyInterfaceJobs.private.swiftinterface " )
633
640
let sdkArgumentsForTesting = ( try ? Driver . sdkArgumentsForTesting ( ) ) ?? [ ]
634
641
var driver = try Driver ( args: [ " swiftc " ,
635
- " -target " , " x86_64-apple-macosx11.0 " ,
636
642
" -I " , cHeadersPath. nativePathString ( escaped: true ) ,
637
643
" -I " , swiftModuleInterfacesPath. nativePathString ( escaped: true ) ,
644
+ " -I " , stdlibPath. nativePathString ( escaped: true ) ,
645
+ " -I " , shimsPath. nativePathString ( escaped: true ) ,
638
646
" -emit-module-interface-path " , swiftInterfacePath. nativePathString ( escaped: true ) ,
639
647
" -emit-private-module-interface-path " , privateSwiftInterfacePath. nativePathString ( escaped: true ) ,
640
648
" -explicit-module-build " , " -verify-emitted-module-interface " ,
@@ -748,6 +756,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
748
756
/// Test generation of explicit module build jobs for dependency modules when the driver
749
757
/// is invoked with -explicit-module-build and -pch-output-dir
750
758
func testExplicitModuleBuildPCHOutputJobs( ) throws {
759
+ let ( stdlibPath, shimsPath, _, _) = try getDriverArtifactsForScanning ( )
751
760
try withTemporaryDirectory { path in
752
761
let main = path. appending ( component: " testExplicitModuleBuildPCHOutputJobs.swift " )
753
762
try localFileSystem. writeFileContents ( main, bytes:
@@ -769,9 +778,10 @@ final class ExplicitModuleBuildTests: XCTestCase {
769
778
let sdkArgumentsForTesting = ( try ? Driver . sdkArgumentsForTesting ( ) ) ?? [ ]
770
779
let pchOutputDir : AbsolutePath = path
771
780
var driver = try Driver ( args: [ " swiftc " ,
772
- " -target " , " x86_64-apple-macosx11.0 " ,
773
781
" -I " , cHeadersPath. nativePathString ( escaped: true ) ,
774
782
" -I " , swiftModuleInterfacesPath. nativePathString ( escaped: true ) ,
783
+ " -I " , stdlibPath. nativePathString ( escaped: true ) ,
784
+ " -I " , shimsPath. nativePathString ( escaped: true ) ,
775
785
" -explicit-module-build " ,
776
786
" -import-objc-header " , bridgingHeaderpath. nativePathString ( escaped: true ) ,
777
787
" -pch-output-dir " , pchOutputDir. nativePathString ( escaped: true ) ,
@@ -883,6 +893,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
883
893
}
884
894
885
895
func testImmediateModeExplicitModuleBuild( ) throws {
896
+ let ( stdlibPath, shimsPath, _, _) = try getDriverArtifactsForScanning ( )
886
897
try withTemporaryDirectory { path in
887
898
let main = path. appending ( component: " testExplicitModuleBuildJobs.swift " )
888
899
try localFileSystem. writeFileContents ( main, bytes: " import C \n " )
@@ -895,9 +906,10 @@ final class ExplicitModuleBuildTests: XCTestCase {
895
906
. appending ( component: " Swift " )
896
907
let sdkArgumentsForTesting = ( try ? Driver . sdkArgumentsForTesting ( ) ) ?? [ ]
897
908
var driver = try Driver ( args: [ " swift " ,
898
- " -target " , " x86_64-apple-macosx11.0 " ,
899
909
" -I " , cHeadersPath. nativePathString ( escaped: true ) ,
900
910
" -I " , swiftModuleInterfacesPath. nativePathString ( escaped: true ) ,
911
+ " -I " , stdlibPath. nativePathString ( escaped: true ) ,
912
+ " -I " , shimsPath. nativePathString ( escaped: true ) ,
901
913
" -explicit-module-build " ,
902
914
main. nativePathString ( escaped: true ) ] + sdkArgumentsForTesting)
903
915
@@ -1723,12 +1735,12 @@ final class ExplicitModuleBuildTests: XCTestCase {
1723
1735
// #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 110000
1724
1736
let expectedNumberOfDependencies : Int
1725
1737
if hostTriple. isMacOSX,
1726
- hostTriple. version ( for: . macOS) >= Triple . Version ( 11 , 0 , 0 ) {
1727
- expectedNumberOfDependencies = 11
1738
+ hostTriple. version ( for: . macOS) < Triple . Version ( 11 , 0 , 0 ) {
1739
+ expectedNumberOfDependencies = 12
1728
1740
} else if driver. targetTriple. isWindows {
1729
1741
expectedNumberOfDependencies = 14
1730
1742
} else {
1731
- expectedNumberOfDependencies = 12
1743
+ expectedNumberOfDependencies = 11
1732
1744
}
1733
1745
1734
1746
// Dispatch several iterations in parallel
0 commit comments