K1/K2: split incremental JPS tests properly (relates to KT-59171)
This commit is contained in:
committed by
Space Team
parent
d8ccf21894
commit
834bd1a71c
@@ -38,7 +38,7 @@ fun main(args: Array<String>) {
|
||||
}
|
||||
|
||||
// IR
|
||||
testClass<AbstractIncrementalJvmJpsTest> {
|
||||
testClass<AbstractIncrementalK1JvmJpsTest> {
|
||||
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(
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ import org.jetbrains.kotlin.jps.targets.KotlinModuleBuildTarget
|
||||
/**
|
||||
* @see [jps-plugin/testData/incremental/cacheVersionChanged/README.md]
|
||||
*/
|
||||
abstract class AbstractIncrementalCacheVersionChangedTest : AbstractIncrementalJvmJpsTest(allowNoFilesWithSuffixInTestData = true) {
|
||||
abstract class AbstractIncrementalCacheVersionChangedTest : AbstractIncrementalK1JvmJpsTest(allowNoFilesWithSuffixInTestData = true) {
|
||||
override fun performAdditionalModifications(modifications: List<Modification>) {
|
||||
val modifiedFiles = modifications.filterIsInstance<ModifyContent>().map { it.path }
|
||||
val targets = projectDescriptor.allModuleTargets
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright 2010-2023 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.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.jps.build
|
||||
|
||||
import org.jetbrains.kotlin.cli.common.arguments.CommonCompilerArguments
|
||||
|
||||
abstract class AbstractIncrementalK1JvmJpsTest(
|
||||
allowNoFilesWithSuffixInTestData: Boolean = false
|
||||
) : AbstractIncrementalJvmJpsTest(allowNoFilesWithSuffixInTestData = allowNoFilesWithSuffixInTestData) {
|
||||
override fun updateCommandLineArguments(arguments: CommonCompilerArguments) {
|
||||
if (KotlinVersion.CURRENT.major >= 2) {
|
||||
arguments.languageVersion = "1.9"
|
||||
}
|
||||
super.updateCommandLineArguments(arguments)
|
||||
}
|
||||
}
|
||||
+4
-1
@@ -12,7 +12,10 @@ abstract class AbstractIncrementalK2FirICLightTreeJvmJpsTest(
|
||||
allowNoFilesWithSuffixInTestData: Boolean = false
|
||||
) : AbstractIncrementalJpsTest(allowNoFilesWithSuffixInTestData = allowNoFilesWithSuffixInTestData) {
|
||||
override fun updateCommandLineArguments(arguments: CommonCompilerArguments) {
|
||||
additionalCommandLineArguments = additionalCommandLineArguments + listOf("-Xuse-k2", "-Xuse-fir-ic", "-Xuse-fir-lt")
|
||||
if (KotlinVersion.CURRENT.major < 2) {
|
||||
arguments.languageVersion = "2.0"
|
||||
}
|
||||
additionalCommandLineArguments = additionalCommandLineArguments + listOf("-Xuse-fir-ic", "-Xuse-fir-lt")
|
||||
super.updateCommandLineArguments(arguments)
|
||||
}
|
||||
|
||||
|
||||
+4
-1
@@ -12,7 +12,10 @@ abstract class AbstractIncrementalK2JvmJpsTest(
|
||||
allowNoFilesWithSuffixInTestData: Boolean = false
|
||||
) : AbstractIncrementalJpsTest(allowNoFilesWithSuffixInTestData = allowNoFilesWithSuffixInTestData) {
|
||||
override fun updateCommandLineArguments(arguments: CommonCompilerArguments) {
|
||||
additionalCommandLineArguments = additionalCommandLineArguments + listOf("-Xuse-k2", "-Xuse-fir-lt=false")
|
||||
if (KotlinVersion.CURRENT.major < 2) {
|
||||
arguments.languageVersion = "2.0"
|
||||
}
|
||||
additionalCommandLineArguments = additionalCommandLineArguments + listOf("-Xuse-fir-lt=false")
|
||||
super.updateCommandLineArguments(arguments)
|
||||
}
|
||||
|
||||
|
||||
+4
-1
@@ -12,7 +12,10 @@ abstract class AbstractIncrementalK2LightTreeJvmJpsTest(
|
||||
allowNoFilesWithSuffixInTestData: Boolean = false
|
||||
) : AbstractIncrementalJpsTest(allowNoFilesWithSuffixInTestData = allowNoFilesWithSuffixInTestData) {
|
||||
override fun updateCommandLineArguments(arguments: CommonCompilerArguments) {
|
||||
additionalCommandLineArguments = additionalCommandLineArguments + listOf("-Xuse-k2", "-Xuse-fir-lt")
|
||||
if (KotlinVersion.CURRENT.major < 2) {
|
||||
arguments.languageVersion = "2.0"
|
||||
}
|
||||
additionalCommandLineArguments = additionalCommandLineArguments + listOf("-Xuse-fir-lt=true")
|
||||
super.updateCommandLineArguments(arguments)
|
||||
}
|
||||
|
||||
|
||||
+180
-180
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user