Skip to content
Merged
Show file tree
Hide file tree
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
26 changes: 9 additions & 17 deletions Tests/SwiftDriverTests/CachingBuildTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,7 @@ final class CachingBuildTests: XCTestCase {
try withTemporaryDirectory { path in
let main = path.appending(component: "testCachingBuildJobs.swift")
try localFileSystem.writeFileContents(main) {
$0 <<< "import C;"
$0 <<< "import E;"
$0 <<< "import G;"
$0.send("import C;import E;import G;")
}
let casPath = path.appending(component: "cas")
let swiftModuleInterfacesPath: AbsolutePath =
Expand Down Expand Up @@ -278,9 +276,7 @@ final class CachingBuildTests: XCTestCase {
try withTemporaryDirectory { path in
let main = path.appending(component: "testExplicitModuleVerifyInterfaceJobs.swift")
try localFileSystem.writeFileContents(main) {
$0 <<< "import C;"
$0 <<< "import E;"
$0 <<< "import G;"
$0.send("import C;import E;import G;")
}

let swiftModuleInterfacesPath: AbsolutePath =
Expand Down Expand Up @@ -427,9 +423,7 @@ final class CachingBuildTests: XCTestCase {
try localFileSystem.createDirectory(moduleCachePath)
let main = path.appending(component: "testCachingBuild.swift")
try localFileSystem.writeFileContents(main) {
$0 <<< "import C;"
$0 <<< "import E;"
$0 <<< "import G;"
$0.send("import C;import E;import G;")
}

let cHeadersPath: AbsolutePath =
Expand Down Expand Up @@ -477,17 +471,17 @@ final class CachingBuildTests: XCTestCase {
let foo = path.appending(component: "foo.swift")
let casPath = path.appending(component: "cas")
try localFileSystem.writeFileContents(foo) {
$0 <<< "extension Profiler {"
$0 <<< " public static let count: Int = 42"
$0 <<< "}"
$0.send("extension Profiler {")
$0.send(" public static let count: Int = 42")
$0.send("}")
}
let fooHeader = path.appending(component: "foo.h")
try localFileSystem.writeFileContents(fooHeader) {
$0 <<< "struct Profiler { void* ptr; };"
$0.send("struct Profiler { void* ptr; };")
}
let main = path.appending(component: "main.swift")
try localFileSystem.writeFileContents(main) {
$0 <<< "import Foo"
$0.send("import Foo")
}
let sdkArgumentsForTesting = (try? Driver.sdkArgumentsForTesting()) ?? []

Expand Down Expand Up @@ -546,9 +540,7 @@ final class CachingBuildTests: XCTestCase {
try withTemporaryDirectory { path in
let main = path.appending(component: "testDependencyScanning.swift")
try localFileSystem.writeFileContents(main) {
$0 <<< "import C;"
$0 <<< "import E;"
$0 <<< "import G;"
$0.send("import C;import E;import G;")
}

let cHeadersPath: AbsolutePath =
Expand Down
14 changes: 6 additions & 8 deletions Tests/SwiftDriverTests/ExplicitModuleBuildTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
try withTemporaryDirectory { path in
let main = path.appending(component: "testExplicitModuleVerifyInterfaceJobs.swift")
try localFileSystem.writeFileContents(main) {
$0 <<< "import C;"
$0 <<< "import E;"
$0 <<< "import G;"
$0.send("import C;import E;import G;")
}

let swiftModuleInterfacesPath: AbsolutePath =
Expand Down Expand Up @@ -1029,17 +1027,17 @@ final class ExplicitModuleBuildTests: XCTestCase {
try localFileSystem.createDirectory(FooInstallPath)
let foo = path.appending(component: "foo.swift")
try localFileSystem.writeFileContents(foo) {
$0 <<< "extension Profiler {"
$0 <<< " public static let count: Int = 42"
$0 <<< "}"
$0.send("extension Profiler {")
$0.send(" public static let count: Int = 42")
$0.send("}")
}
let fooHeader = path.appending(component: "foo.h")
try localFileSystem.writeFileContents(fooHeader) {
$0 <<< "struct Profiler { void* ptr; };"
$0.send("struct Profiler { void* ptr; };")
}
let main = path.appending(component: "main.swift")
try localFileSystem.writeFileContents(main) {
$0 <<< "import Foo"
$0.send("import Foo")
}
let sdkArgumentsForTesting = (try? Driver.sdkArgumentsForTesting()) ?? []

Expand Down
5 changes: 3 additions & 2 deletions Tests/SwiftDriverTests/SwiftDriverTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2200,8 +2200,9 @@ final class SwiftDriverTests: XCTestCase {

do {
try withTemporaryDirectory { path in
try localFileSystem.writeFileContents(
path.appending(components: "wasi", "static-executable-args.lnk")) { $0 <<< "garbage" }
try localFileSystem.writeFileContents(path.appending(components: "wasi", "static-executable-args.lnk")) {
$0.send("garbage")
}
// Wasm executable linking
var driver = try Driver(args: commonArgs + ["-emit-executable", "-Ounchecked",
"-target", "wasm32-unknown-wasi",
Expand Down