Skip to content

Commit ae2dc3c

Browse files
Disable incremental test suite on windows
1 parent b7bebe3 commit ae2dc3c

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

Tests/SwiftDriverTests/ExplicitModuleBuildTests.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2715,9 +2715,6 @@ final class ExplicitModuleBuildTests: XCTestCase {
27152715

27162716
func testTraceDependency() throws {
27172717
try withTemporaryDirectory { path in
2718-
#if os(Windows)
2719-
throw XCTSkip("generatePCM error on windows")
2720-
#endif
27212718
try localFileSystem.changeCurrentWorkingDirectory(to: path)
27222719
let moduleCachePath = path.appending(component: "ModuleCache")
27232720
try localFileSystem.createDirectory(moduleCachePath)

Tests/SwiftDriverTests/IncrementalCompilationTests.swift

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ final class IncrementalCompilationTests: XCTestCase {
116116
}
117117
var extraExplicitBuildArgs: [String] = []
118118

119-
override func setUp() {
119+
override func setUpWithError() throws {
120+
try super.setUpWithError()
121+
120122
self.tempDir = try! withTemporaryDirectory(removeTreeOnDeinit: false) {$0}
121123
try! localFileSystem.createDirectory(explicitModuleCacheDir)
122124
try! localFileSystem.createDirectory(derivedDataPath)
@@ -154,6 +156,9 @@ final class IncrementalCompilationTests: XCTestCase {
154156
if driver.isFrontendArgSupported(.moduleLoadMode) {
155157
self.extraExplicitBuildArgs = ["-Xfrontend", "-module-load-mode", "-Xfrontend", "prefer-interface"]
156158
}
159+
160+
// Disable incremental tests on windows due to very different module setup.
161+
try XCTSkipIf(driver.targetTriple.isWindows, "https://github.com/swiftlang/swift-driver/issues/2029")
157162
}
158163

159164
deinit {
@@ -360,7 +365,7 @@ extension IncrementalCompilationTests {
360365
XCTAssertFalse(mandatoryJobInputs.contains("other.swift"))
361366
}
362367

363-
// External deps timestamp updated but contents are the same, and file-hashing is explicitly disabled
368+
// External deps timestamp updated but contents are the same, and file-hashing is explicitly disabled
364369
func testExplicitIncrementalBuildExternalDepsWithoutHashing() throws {
365370
replace(contentsOf: "other", with: "import E;let bar = foo")
366371
try buildInitialState(extraArguments: ["-disable-incremental-file-hashing"], explicitModuleBuild: true)
@@ -372,7 +377,7 @@ extension IncrementalCompilationTests {
372377
XCTAssertTrue(mandatoryJobInputs.contains("main.swift"))
373378
}
374379

375-
// Source file timestamps updated but contents are the same, and file-hashing is explicitly disabled
380+
// Source file timestamps updated but contents are the same, and file-hashing is explicitly disabled
376381
func testExplicitIncrementalBuildSourceFilesWithoutHashing() throws {
377382
try buildInitialState(extraArguments: ["-disable-incremental-file-hashing"], explicitModuleBuild: true)
378383
touch("main")
@@ -1043,7 +1048,7 @@ extension IncrementalCompilationTests {
10431048
}
10441049

10451050
private func testRemoval(_ options: RemovalTestOptions) throws {
1046-
setUp() // clear derived data, restore output file map
1051+
try setUpWithError() // clear derived data, restore output file map
10471052
print("\n*** testRemoval \(options) ***", to: &stderrStream); stderrStream.flush()
10481053

10491054
let newInput = "another"

0 commit comments

Comments
 (0)