Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions Tests/SwiftDriverTests/ExplicitModuleBuildTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,8 @@ final class ExplicitModuleBuildTests: XCTestCase {
func testModuleAliasingWithExplicitBuild() throws {
try withTemporaryDirectory { path in
try localFileSystem.changeCurrentWorkingDirectory(to: path)
let moduleCachePath = path.appending(component: "ModuleCache")
try localFileSystem.createDirectory(moduleCachePath)
let srcBar = path.appending(component: "bar.swift")
let moduleBarPath = path.appending(component: "Bar.swiftmodule").nativePathString(escaped: true)
try localFileSystem.writeFileContents(srcBar) {
Expand All @@ -704,6 +706,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
path.nativePathString(escaped: true),
"-emit-module",
"-emit-module-path", moduleBarPath,
"-module-cache-path", moduleCachePath.nativePathString(escaped: true),
srcBar.nativePathString(escaped: true),
"-I", stdLibPath.nativePathString(escaped: true),
"-I", shimsPath.nativePathString(escaped: true),
Expand Down Expand Up @@ -737,8 +740,8 @@ final class ExplicitModuleBuildTests: XCTestCase {
"-working-directory",
path.nativePathString(escaped: true),
"-emit-module",
"-emit-module-path",
moduleFooPath,
"-emit-module-path", moduleFooPath,
"-module-cache-path", moduleCachePath.nativePathString(escaped: true),
"-module-alias",
"Car=Bar",
srcFoo.nativePathString(escaped: true),
Expand All @@ -756,6 +759,8 @@ final class ExplicitModuleBuildTests: XCTestCase {
func testExplicitModuleBuildEndToEnd() throws {
try withTemporaryDirectory { path in
try localFileSystem.changeCurrentWorkingDirectory(to: path)
let moduleCachePath = path.appending(component: "ModuleCache")
try localFileSystem.createDirectory(moduleCachePath)
let main = path.appending(component: "testExplicitModuleBuildEndToEnd.swift")
try localFileSystem.writeFileContents(main) {
$0 <<< "import C;"
Expand All @@ -773,7 +778,8 @@ final class ExplicitModuleBuildTests: XCTestCase {
var driver = try Driver(args: ["swiftc",
"-I", cHeadersPath.nativePathString(escaped: true),
"-I", swiftModuleInterfacesPath.nativePathString(escaped: true),
"-explicit-module-build",
"-explicit-module-build", "-v",
"-module-cache-path", moduleCachePath.nativePathString(escaped: true),
"-working-directory", path.nativePathString(escaped: true),
main.nativePathString(escaped: true)] + sdkArgumentsForTesting,
env: ProcessEnv.vars)
Expand Down