Skip to content

Commit 40e5350

Browse files
ting-yuanKSP Auto Pick
authored and
KSP Auto Pick
committed
Update test cases for compilation avoidance.
(cherry picked from commit be4f3f8)
1 parent f68437a commit 40e5350

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

integration-tests/src/test/kotlin/com/google/devtools/ksp/test/IncrementalCPIT.kt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,7 @@ class IncrementalCPIT(val useKSP2: Boolean) {
105105
File(project.root, src).writeText("package p1\n\nfun MyTopFunc1(): Int = 1")
106106
gradleRunner.withArguments("assemble").build().let { result ->
107107
// Value changes should not result in re-processing.
108-
Assert.assertEquals(TaskOutcome.SUCCESS, result.task(":workload:kspKotlin")?.outcome)
109-
val dirties = result.output.lines().filter { it.startsWith("w: [ksp]") }.toSet()
110-
// Non-signature changes should not affect anything.
111-
Assert.assertEquals(emptyMessage, dirties)
108+
Assert.assertEquals(TaskOutcome.UP_TO_DATE, result.task(":workload:kspKotlin")?.outcome)
112109
}
113110
}
114111

@@ -151,10 +148,7 @@ class IncrementalCPIT(val useKSP2: Boolean) {
151148
File(project.root, src).writeText("package p1\n\nval MyTopProp1: Int = 1")
152149
gradleRunner.withArguments("assemble").build().let { result ->
153150
// Value changes should not result in re-processing.
154-
Assert.assertEquals(TaskOutcome.SUCCESS, result.task(":workload:kspKotlin")?.outcome)
155-
val dirties = result.output.lines().filter { it.startsWith("w: [ksp]") }.toSet()
156-
// Non-signature changes should not affect anything.
157-
Assert.assertEquals(emptyMessage, dirties)
151+
Assert.assertEquals(TaskOutcome.UP_TO_DATE, result.task(":workload:kspKotlin")?.outcome)
158152
}
159153
}
160154

integration-tests/src/test/kotlin/com/google/devtools/ksp/test/IncrementalEmptyCPIT.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ class IncrementalEmptyCPIT(val useKSP2: Boolean) {
4848
File(project.root, src).writeText("package p1\n\nval MyTopProp1: Int = 1")
4949
gradleRunner.withArguments("assemble").build().let { result ->
5050
// Value changes will result in re-processing of aggregating outputs.
51-
Assert.assertEquals(TaskOutcome.SUCCESS, result.task(":workload:kspKotlin")?.outcome)
52-
val dirties = result.output.lines().filter { it.startsWith("w: [ksp]") }.toSet()
53-
Assert.assertEquals(expectedDirties, dirties)
51+
Assert.assertEquals(TaskOutcome.UP_TO_DATE, result.task(":workload:kspKotlin")?.outcome)
5452
}
5553
}
5654
}

0 commit comments

Comments
 (0)