Skip to content

Commit 9d721df

Browse files
author
David Ungar
authored
Merge pull request #393 from davidungar/enable-test-once-use-frontend-path-woris
[Incremental] Enable testBatchModeContinueAfterErrors & skip frontend query even if no extra arguments to -driver-use-frontend-path
2 parents 1501097 + a4cad5f commit 9d721df

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Sources/SwiftDriver/Driver/Driver.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2061,8 +2061,10 @@ extension Driver {
20612061
toolDirectory: toolDir)
20622062

20632063
// Find the Swift compiler executable.
2064+
let hasFrontendBeenRedirectedForTesting: Bool
20642065
let swiftCompilerPrefixArgs: [String]
20652066
if let frontendPath = parsedOptions.getLastArgument(.driverUseFrontendPath){
2067+
hasFrontendBeenRedirectedForTesting = true
20662068
var frontendCommandLine =
20672069
frontendPath.asSingle.split(separator: ";").map { String($0) }
20682070
if frontendCommandLine.isEmpty {
@@ -2075,11 +2077,9 @@ extension Driver {
20752077
swiftCompilerPrefixArgs = frontendCommandLine
20762078
}
20772079
} else {
2080+
hasFrontendBeenRedirectedForTesting = false
20782081
swiftCompilerPrefixArgs = []
20792082
}
2080-
var hasFrontendBeenRedirectedForTesting: Bool {
2081-
return !swiftCompilerPrefixArgs.isEmpty
2082-
}
20832083

20842084
// Find the SDK, if any.
20852085
let sdkPath: VirtualPath? = Self.computeSDKPath(

Tests/SwiftDriverTests/SwiftDriverTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1472,7 +1472,6 @@ final class SwiftDriverTests: XCTestCase {
14721472
}
14731473

14741474
func testBatchModeContinueAfterErrors() throws {
1475-
throw XCTSkip("This test requires the fix to honoring -driver-use-frontend-path")
14761475
struct MockExecutor: DriverExecutor {
14771476
let resolver = try! ArgsResolver(fileSystem: localFileSystem)
14781477

0 commit comments

Comments
 (0)