Skip to content

Clean up testRemoval #719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 21, 2021
Merged
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: 7 additions & 19 deletions Tests/SwiftDriverTests/IncrementalCompilationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -372,27 +372,10 @@ extension RemovalTestOptions {
}

extension IncrementalCompilationTests {
/// While all cases are being made to work, just test for now in known good cases
func testRemovalInPassingCases() throws {
try testRemoval(includeFailingCombos: false)
}

func testRemovalInAllCases() throws {
try testRemoval(includeFailingCombos: true)
}

func testRemoval(includeFailingCombos: Bool) throws {
func testRemoval() throws {
#if !os(Linux)
let knownGoodCombos: [[RemovalTestOption]] = [
[.removeInputFromInvocation],
]
for optionsToTest in RemovalTestOptions.allCombinations {
if knownGoodCombos.contains(optionsToTest) {
try testRemoval(optionsToTest)
}
else if includeFailingCombos {
try testRemoval(optionsToTest)
}
try testRemoval(optionsToTest)
}
#endif
}
Expand Down Expand Up @@ -826,6 +809,11 @@ extension IncrementalCompilationTests {
// containing entries for the deleted file. This test simulates that
// condition by restoring the deleted priors. The driver ought to be fixed
// to cull any entries for removed files from the deserialized priors.
//
// There is a wrinkle: How can a node for a decl in a removed file be
// distinguished from a node for a decl in an incrementally-imported
// external dependency? In both cases the node's `dependencySource`
// is for a file that is not in the `inputFiles`.
print("*** WARNING: skipping checks, driver fails to cleaned out the graph ***",
to: &stderrStream); stderrStream.flush()
return graph
Expand Down