@@ -687,6 +687,8 @@ final class ExplicitModuleBuildTests: XCTestCase {
687
687
func testModuleAliasingWithExplicitBuild( ) throws {
688
688
try withTemporaryDirectory { path in
689
689
try localFileSystem. changeCurrentWorkingDirectory ( to: path)
690
+ let moduleCachePath = path. appending ( component: " ModuleCache " )
691
+ try localFileSystem. createDirectory ( moduleCachePath)
690
692
let srcBar = path. appending ( component: " bar.swift " )
691
693
let moduleBarPath = path. appending ( component: " Bar.swiftmodule " ) . nativePathString ( escaped: true )
692
694
try localFileSystem. writeFileContents ( srcBar) {
@@ -704,6 +706,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
704
706
path. nativePathString ( escaped: true ) ,
705
707
" -emit-module " ,
706
708
" -emit-module-path " , moduleBarPath,
709
+ " -module-cache-path " , moduleCachePath. nativePathString ( escaped: true ) ,
707
710
srcBar. nativePathString ( escaped: true ) ,
708
711
" -I " , stdLibPath. nativePathString ( escaped: true ) ,
709
712
" -I " , shimsPath. nativePathString ( escaped: true ) ,
@@ -737,8 +740,8 @@ final class ExplicitModuleBuildTests: XCTestCase {
737
740
" -working-directory " ,
738
741
path. nativePathString ( escaped: true ) ,
739
742
" -emit-module " ,
740
- " -emit-module-path " ,
741
- moduleFooPath ,
743
+ " -emit-module-path " , moduleFooPath ,
744
+ " -module-cache-path " , moduleCachePath . nativePathString ( escaped : true ) ,
742
745
" -module-alias " ,
743
746
" Car=Bar " ,
744
747
srcFoo. nativePathString ( escaped: true ) ,
@@ -756,6 +759,8 @@ final class ExplicitModuleBuildTests: XCTestCase {
756
759
func testExplicitModuleBuildEndToEnd( ) throws {
757
760
try withTemporaryDirectory { path in
758
761
try localFileSystem. changeCurrentWorkingDirectory ( to: path)
762
+ let moduleCachePath = path. appending ( component: " ModuleCache " )
763
+ try localFileSystem. createDirectory ( moduleCachePath)
759
764
let main = path. appending ( component: " testExplicitModuleBuildEndToEnd.swift " )
760
765
try localFileSystem. writeFileContents ( main) {
761
766
$0 <<< " import C; "
@@ -773,7 +778,8 @@ final class ExplicitModuleBuildTests: XCTestCase {
773
778
var driver = try Driver ( args: [ " swiftc " ,
774
779
" -I " , cHeadersPath. nativePathString ( escaped: true ) ,
775
780
" -I " , swiftModuleInterfacesPath. nativePathString ( escaped: true ) ,
776
- " -explicit-module-build " ,
781
+ " -explicit-module-build " , " -v " ,
782
+ " -module-cache-path " , moduleCachePath. nativePathString ( escaped: true ) ,
777
783
" -working-directory " , path. nativePathString ( escaped: true ) ,
778
784
main. nativePathString ( escaped: true ) ] + sdkArgumentsForTesting,
779
785
env: ProcessEnv . vars)
0 commit comments