Expanded incremental compilation tests with cache version change.
This commit is contained in:
+14
-4
@@ -32,15 +32,25 @@ public class IncrementalCacheVersionChangedTest : AbstractIncrementalJpsTest() {
|
||||
doTest("jps-plugin/testData/incremental/custom/cacheVersionChangedAndFileModified/")
|
||||
}
|
||||
|
||||
fun testCacheVersionChangedMultiModule() {
|
||||
doTest("jps-plugin/testData/incremental/custom/cacheVersionChangedMultiModule/")
|
||||
}
|
||||
|
||||
override val allowNoFilesWithSuffixInTestData: Boolean
|
||||
get() = true
|
||||
|
||||
override fun performAdditionalModifications() {
|
||||
val storageForTargetType = BuildDataPathsImpl(myDataStorageRoot).getTargetTypeDataRoot(JavaModuleBuildTargetType.PRODUCTION)
|
||||
val relativePath = "module/${CacheFormatVersion.FORMAT_VERSION_FILE_PATH}"
|
||||
val cacheVersionFile = File(storageForTargetType, relativePath)
|
||||
|
||||
assertTrue(cacheVersionFile.exists())
|
||||
cacheVersionFile.writeText("777")
|
||||
|
||||
val moduleNames = if (getTestName(false) == "CacheVersionChangedMultiModule") listOf("module1", "module2") else listOf("module")
|
||||
|
||||
for (moduleName in moduleNames) {
|
||||
val relativePath = "$moduleName/${CacheFormatVersion.FORMAT_VERSION_FILE_PATH}"
|
||||
val cacheVersionFile = File(storageForTargetType, relativePath)
|
||||
|
||||
assertTrue(cacheVersionFile.exists())
|
||||
cacheVersionFile.writeText("777")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package test
|
||||
|
||||
fun f() {
|
||||
other.other()
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
package test
|
||||
|
||||
fun g() {
|
||||
other.other()
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
package test
|
||||
|
||||
fun g() {
|
||||
other.other()
|
||||
}
|
||||
@@ -3,9 +3,12 @@ out/production/module/test/TestPackage$b$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/other/OtherPackage$other$*.class
|
||||
out/production/module/other/OtherPackage.class
|
||||
out/production/module/test/TestPackage$a$*.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/a.kt
|
||||
src/b.kt
|
||||
src/other.kt
|
||||
End of files
|
||||
@@ -0,0 +1,4 @@
|
||||
package other
|
||||
|
||||
fun other() {
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
Cleaning output files:
|
||||
out/production/module1/a/A.class
|
||||
out/production/module1/a/APackage$module1_a$*.class
|
||||
out/production/module1/a/APackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
module1/src/module1_a.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module2/b/BPackage$module2_b$*.class
|
||||
out/production/module2/b/BPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
module2/src/module2_b.kt
|
||||
End of files
|
||||
@@ -0,0 +1,2 @@
|
||||
module1->
|
||||
module2->module1
|
||||
@@ -0,0 +1,6 @@
|
||||
package a
|
||||
|
||||
class A
|
||||
|
||||
fun a() {
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package b
|
||||
|
||||
fun b(param: a.A) {
|
||||
a.a()
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package b
|
||||
|
||||
fun b(param: a.A) {
|
||||
a.a()
|
||||
}
|
||||
Reference in New Issue
Block a user