Skip to content

Commit fface9b

Browse files
committed
Disable the REPL test when no LLDB is found in the toolchain.
1 parent cc597d0 commit fface9b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Tests/SwiftDriverTests/SwiftDriverTests.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,6 +1359,22 @@ final class SwiftDriverTests: XCTestCase {
13591359
}
13601360

13611361
func testRepl() throws {
1362+
// Do not run this test if no LLDB is found in the toolchain.
1363+
let executor = try SwiftDriverExecutor(diagnosticsEngine: DiagnosticsEngine(),
1364+
processSet: ProcessSet(),
1365+
fileSystem: localFileSystem,
1366+
env: ProcessEnv.vars)
1367+
var toolchain: Toolchain
1368+
#if os(macOS)
1369+
toolchain = DarwinToolchain(env: ProcessEnv.vars, executor: executor)
1370+
#else
1371+
toolchain = GenericUnixToolchain(env: ProcessEnv.vars, executor: executor)
1372+
#endif
1373+
do {
1374+
_ = try toolchain.getToolPath(.lldb)
1375+
} catch ToolchainError.unableToFind {
1376+
return
1377+
}
13621378

13631379
func isLLDBREPLFlag(_ arg: Job.ArgTemplate) -> Bool {
13641380
if case .flag(let replString) = arg {

0 commit comments

Comments
 (0)