Skip to content

Commit e9212a4

Browse files
[Tests] Fix another early termination in tests
When running swift-driver test suite with an older compiler that doesn't support bridging header chaining, the second part of the bridging header caching test will just be a single job, from which the default executor will run the swift-frontend in-place. This will cause the test suite to early exit regardless of the state of the test suite.
1 parent e02fad1 commit e9212a4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Tests/SwiftDriverTests/CachingBuildTests.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -720,13 +720,13 @@ final class CachingBuildTests: XCTestCase {
720720
interModuleDependencyOracle: dependencyOracle)
721721
let jobs = try driver.planBuild()
722722
for job in jobs {
723-
XCTAssertFalse(job.outputCacheKeys.isEmpty)
723+
XCTAssertFalse(job.outputCacheKeys.isEmpty)
724724
}
725-
if driver.isFrontendArgSupported(.importPch) {
726-
XCTAssertTrue(jobs.contains { $0.kind == .generatePCH })
725+
if driver.isFrontendArgSupported(.autoBridgingHeaderChaining) {
726+
XCTAssertTrue(jobs.contains { $0.kind == .generatePCH })
727+
try driver.run(jobs: jobs)
728+
XCTAssertFalse(driver.diagnosticEngine.hasErrors)
727729
}
728-
try driver.run(jobs: jobs)
729-
XCTAssertFalse(driver.diagnosticEngine.hasErrors)
730730
}
731731
}
732732

0 commit comments

Comments
 (0)