Update and regenerate incremental compilation tests for 1.5

Set TargetBackend.JVM_IR for these tests by default; remove the
generated IR-based test and add a new old-backend-based test. This fixes
the issue where some (3) of these tests were not properly ignored
because of incorrect target backend used in the test generator.

Also update test data for some tests which use local functions, which
are not generated to separate anonymous classes in JVM IR.
This commit is contained in:
Alexander Udalov
2021-01-13 18:08:30 +01:00
committed by Dmitriy Novozhilov
parent 4dff7e648f
commit 1deb317e0d
7 changed files with 863 additions and 859 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -8,9 +8,9 @@ package org.jetbrains.kotlin.incremental
import org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments
import java.io.File
abstract class AbstractIrIncrementalJvmCompilerRunnerTest : AbstractIncrementalJvmCompilerRunnerTest() {
abstract class AbstractIncrementalJvmOldBackendCompilerRunnerTest : AbstractIncrementalJvmCompilerRunnerTest() {
override fun createCompilerArguments(destinationDir: File, testDir: File): K2JVMCompilerArguments =
super.createCompilerArguments(destinationDir, testDir).apply {
useIR = true
useOldBackend = true
}
}
@@ -1443,13 +1443,18 @@ fun main(args: Array<String>) {
testGroup("jps-plugin/jps-tests/test", "jps-plugin/testData") {
testClass<AbstractIncrementalJvmJpsTest> {
model("incremental/multiModule/common", extension = null, excludeParentDirs = true)
model("incremental/multiModule/jvm", extension = null, excludeParentDirs = true)
model("incremental/multiModule/multiplatform/custom", extension = null, excludeParentDirs = true)
model("incremental/pureKotlin", extension = null, recursive = false)
model("incremental/withJava", extension = null, excludeParentDirs = true)
model("incremental/inlineFunCallSite", extension = null, excludeParentDirs = true)
model("incremental/classHierarchyAffected", extension = null, excludeParentDirs = true)
model("incremental/multiModule/common", extension = null, excludeParentDirs = true, targetBackend = TargetBackend.JVM_IR)
model("incremental/multiModule/jvm", extension = null, excludeParentDirs = true, targetBackend = TargetBackend.JVM_IR)
model(
"incremental/multiModule/multiplatform/custom", extension = null, excludeParentDirs = true,
targetBackend = TargetBackend.JVM_IR
)
model("incremental/pureKotlin", extension = null, recursive = false, targetBackend = TargetBackend.JVM_IR)
model("incremental/withJava", extension = null, excludeParentDirs = true, targetBackend = TargetBackend.JVM_IR)
model("incremental/inlineFunCallSite", extension = null, excludeParentDirs = true, targetBackend = TargetBackend.JVM_IR)
model(
"incremental/classHierarchyAffected", extension = null, excludeParentDirs = true, targetBackend = TargetBackend.JVM_IR
)
}
actualizeMppJpsIncTestCaseDirs(testDataRoot, "incremental/multiModule/multiplatform/withGeneratedContent")
@@ -1518,8 +1523,8 @@ fun main(args: Array<String>) {
model("incremental/withJava", extension = null, excludeParentDirs = true, targetBackend = targetBackend)
model("incremental/incrementalJvmCompilerOnly", extension = null, excludeParentDirs = true, targetBackend = targetBackend)
}
testClass<AbstractIncrementalJvmCompilerRunnerTest>(init = incrementalJvmTestData(TargetBackend.JVM))
testClass<AbstractIrIncrementalJvmCompilerRunnerTest>(init = incrementalJvmTestData(TargetBackend.JVM_IR))
testClass<AbstractIncrementalJvmCompilerRunnerTest>(init = incrementalJvmTestData(TargetBackend.JVM_IR))
testClass<AbstractIncrementalJvmOldBackendCompilerRunnerTest>(init = incrementalJvmTestData(TargetBackend.JVM))
testClass<AbstractIncrementalJsCompilerRunnerTest> {
model("incremental/pureKotlin", extension = null, recursive = false)
File diff suppressed because it is too large Load Diff
@@ -13,7 +13,6 @@ Exit code: ADDITIONAL_PASS_REQUIRED
------------------------------------------
Cleaning output files:
out/production/module/META-INF/module.kotlin_module
out/production/module/usage/UsageKt$usage$1.class
out/production/module/usage/UsageKt.class
End of files
Compiling files:
@@ -10,7 +10,6 @@ Compiling files:
End of files
Cleaning output files:
out/production/module/META-INF/module.kotlin_module
out/production/module/WillBeResolvedToOtherKt$willBeResolvedToOther$1.class
out/production/module/WillBeResolvedToOtherKt.class
out/production/module/WillBeUnresolvedKt.class
End of files