[K/N][tests] Rework tags for K/N tests
Use plain combinations of tags, examples: * codegen/box w/o FIR: 'codegen & !frontend-fir' * codegen/box with FIR: 'codegen & frontend-fir' Avoid using tags with multiple aspects in their names, examples: * 'codegenK1' * 'firCodegen' The obsolete tags to be removed but still used in TeamCity configurations: * 'stdlibK2' * 'kotlin-testK2' * 'codegenK2' * 'k2libContents' * 'firInfrastructure'
This commit is contained in:
committed by
Space Team
parent
f2b6cbeee8
commit
0de06757ca
+36
-28
@@ -29,8 +29,6 @@ fun main() {
|
||||
testClass<AbstractNativeCodegenBoxTest>(
|
||||
suiteTestClassName = "NativeCodegenBoxTestGenerated",
|
||||
annotations = listOf(
|
||||
codegen(),
|
||||
k1Codegen(),
|
||||
provider<UseExtTestCaseGroupProvider>(),
|
||||
disabledInOneStageMode(
|
||||
"codegen/box/coroutines/featureIntersection/defaultExpect.kt",
|
||||
@@ -45,8 +43,6 @@ fun main() {
|
||||
testClass<AbstractNativeCodegenBoxTest>(
|
||||
suiteTestClassName = "NativeCodegenBoxTestNoPLGenerated",
|
||||
annotations = listOf(
|
||||
codegen(),
|
||||
k1Codegen(),
|
||||
provider<UseExtTestCaseGroupProvider>(),
|
||||
*noPartialLinkage()
|
||||
)
|
||||
@@ -57,10 +53,9 @@ fun main() {
|
||||
testClass<AbstractNativeCodegenBoxTest>(
|
||||
suiteTestClassName = "FirNativeCodegenBoxTestGenerated",
|
||||
annotations = listOf(
|
||||
codegenK2(),
|
||||
firCodegen(),
|
||||
provider<UseExtTestCaseGroupProvider>(),
|
||||
provider<FirPipeline>()
|
||||
deprecated_codegenK2(),
|
||||
*frontendFir(),
|
||||
provider<UseExtTestCaseGroupProvider>()
|
||||
)
|
||||
) {
|
||||
model("codegen/box", targetBackend = TargetBackend.NATIVE)
|
||||
@@ -69,10 +64,9 @@ fun main() {
|
||||
testClass<AbstractNativeCodegenBoxTest>(
|
||||
suiteTestClassName = "FirNativeCodegenBoxTestNoPLGenerated",
|
||||
annotations = listOf(
|
||||
codegenK2(),
|
||||
firCodegen(),
|
||||
deprecated_codegenK2(),
|
||||
*frontendFir(),
|
||||
provider<UseExtTestCaseGroupProvider>(),
|
||||
provider<FirPipeline>(),
|
||||
*noPartialLinkage()
|
||||
)
|
||||
) {
|
||||
@@ -85,7 +79,10 @@ fun main() {
|
||||
testGroup("native/native.tests/tests-gen", "native/native.tests/testData") {
|
||||
testClass<AbstractNativeBlackBoxTest>(
|
||||
suiteTestClassName = "InfrastructureTestGenerated",
|
||||
annotations = listOf(infrastructure(), k1Infrastructure(), provider<UseStandardTestCaseGroupProvider>())
|
||||
annotations = listOf(
|
||||
infrastructure(),
|
||||
provider<UseStandardTestCaseGroupProvider>()
|
||||
)
|
||||
) {
|
||||
model("samples")
|
||||
model("samples2")
|
||||
@@ -95,7 +92,12 @@ fun main() {
|
||||
testGroup("native/native.tests/tests-gen", "native/native.tests/testData") {
|
||||
testClass<AbstractNativeBlackBoxTest>(
|
||||
suiteTestClassName = "FirInfrastructureTestGenerated",
|
||||
annotations = listOf(infrastructure(), firInfrastructure(), provider<UseStandardTestCaseGroupProvider>(), provider<FirPipeline>())
|
||||
annotations = listOf(
|
||||
infrastructure(),
|
||||
deprecated_firInfrastructure(),
|
||||
*frontendFir(),
|
||||
provider<UseStandardTestCaseGroupProvider>()
|
||||
)
|
||||
) {
|
||||
model("samples")
|
||||
model("samples2")
|
||||
@@ -111,7 +113,9 @@ fun main() {
|
||||
}
|
||||
testClass<AbstractNativePartialLinkageTest>(
|
||||
suiteTestClassName = "FirNativePartialLinkageTestGenerated",
|
||||
annotations = listOf(provider<FirPipeline>())
|
||||
annotations = listOf(
|
||||
*frontendFir()
|
||||
)
|
||||
) {
|
||||
model("klibABI/", pattern = "^([^_](.+))$", recursive = false)
|
||||
}
|
||||
@@ -126,7 +130,9 @@ fun main() {
|
||||
}
|
||||
testClass<AbstractNativeKlibEvolutionTest>(
|
||||
suiteTestClassName = "FirNativeKlibEvolutionTestGenerated",
|
||||
annotations = listOf(provider<FirPipeline>())
|
||||
annotations = listOf(
|
||||
*frontendFir()
|
||||
)
|
||||
) {
|
||||
model("binaryCompatibility/klibEvolution", recursive = false)
|
||||
}
|
||||
@@ -165,8 +171,7 @@ fun main() {
|
||||
// Klib contents tests
|
||||
testGroup("native/native.tests/tests-gen", "native/native.tests/testData") {
|
||||
testClass<AbstractNativeKlibContentsTest>(
|
||||
suiteTestClassName = "NativeKLibContentsTestGenerated",
|
||||
annotations = listOf(k1libContents())
|
||||
suiteTestClassName = "NativeKLibContentsTestGenerated"
|
||||
) {
|
||||
model("klibContents", pattern = "^([^_](.+)).kt$", recursive = true)
|
||||
}
|
||||
@@ -174,7 +179,10 @@ fun main() {
|
||||
testGroup("native/native.tests/tests-gen", "native/native.tests/testData") {
|
||||
testClass<AbstractNativeKlibContentsTest>(
|
||||
suiteTestClassName = "FirNativeKLibContentsTestGenerated",
|
||||
annotations = listOf(k2libContents(), firKLibContents(), provider<FirPipeline>())
|
||||
annotations = listOf(
|
||||
deprecated_k2libContents(),
|
||||
*frontendFir()
|
||||
)
|
||||
) {
|
||||
model("klibContents", pattern = "^([^_](.+)).kt$", recursive = true)
|
||||
}
|
||||
@@ -226,15 +234,15 @@ private fun TestGroup.disabledInOneStageMode(vararg unexpandedPaths: String): An
|
||||
)
|
||||
}
|
||||
|
||||
// Marker tags. TODO: Reconsider and reduce amount of marker tags.
|
||||
private fun codegen() = annotation(Tag::class.java, "codegen")
|
||||
private fun k1Codegen() = annotation(Tag::class.java, "k1Codegen")
|
||||
private fun codegenK2() = annotation(Tag::class.java, "codegenK2")
|
||||
private fun firCodegen() = annotation(Tag::class.java, "firCodegen")
|
||||
private fun frontendFir() = arrayOf(
|
||||
annotation(Tag::class.java, "frontend-fir"),
|
||||
annotation(FirPipeline::class.java)
|
||||
)
|
||||
|
||||
private fun debugger() = annotation(Tag::class.java, "debugger")
|
||||
private fun infrastructure() = annotation(Tag::class.java, "infrastructure")
|
||||
private fun k1Infrastructure() = annotation(Tag::class.java, "k1Infrastructure")
|
||||
private fun firInfrastructure() = annotation(Tag::class.java, "firInfrastructure")
|
||||
private fun k1libContents() = annotation(Tag::class.java, "k1libContents")
|
||||
private fun k2libContents() = annotation(Tag::class.java, "k2libContents")
|
||||
private fun firKLibContents() = annotation(Tag::class.java, "firKlibContents")
|
||||
|
||||
// TODO: To be removed.
|
||||
private fun deprecated_codegenK2() = annotation(Tag::class.java, "codegenK2")
|
||||
private fun deprecated_k2libContents() = annotation(Tag::class.java, "k2libContents")
|
||||
private fun deprecated_firInfrastructure() = annotation(Tag::class.java, "firInfrastructure")
|
||||
|
||||
+2
@@ -13,6 +13,7 @@ import org.jetbrains.kotlin.konan.blackboxtest.support.util.ExternalSourceTransf
|
||||
import org.jetbrains.kotlin.konan.blackboxtest.support.util.ExternalSourceTransformers
|
||||
import org.jetbrains.kotlin.konan.blackboxtest.support.util.ThreadSafeCache
|
||||
import org.jetbrains.kotlin.konan.blackboxtest.support.util.getAbsoluteFile
|
||||
import org.junit.jupiter.api.Tag
|
||||
import java.io.File
|
||||
|
||||
// Disable codegen/box/properties/lateinit/isInitializedAndDeinitialize tests with ONE_STAGE_MULTI_MODULE
|
||||
@@ -22,6 +23,7 @@ import java.io.File
|
||||
property = ClassLevelProperty.TEST_MODE,
|
||||
propertyValue = "ONE_STAGE_MULTI_MODULE"
|
||||
)
|
||||
@Tag("codegen")
|
||||
abstract class AbstractNativeCodegenBoxTest : ExternalSourceTransformersProvider, AbstractNativeBlackBoxTest() {
|
||||
private val registeredSourceTransformers: ThreadSafeCache<File, MutableList<ExternalSourceTransformer>> = ThreadSafeCache()
|
||||
|
||||
|
||||
-1
@@ -15,7 +15,6 @@ import org.jetbrains.kotlin.konan.blackboxtest.support.group.UsePartialLinkage
|
||||
import org.jetbrains.kotlin.konan.blackboxtest.support.runner.*
|
||||
import org.jetbrains.kotlin.konan.blackboxtest.support.settings.*
|
||||
import org.jetbrains.kotlin.konan.blackboxtest.support.util.*
|
||||
import org.jetbrains.kotlin.test.services.JUnit5Assertions.assertEquals
|
||||
import org.jetbrains.kotlin.test.services.JUnit5Assertions.assertEqualsToFile
|
||||
import org.junit.jupiter.api.Tag
|
||||
import java.io.File
|
||||
|
||||
+4
-4
@@ -15,7 +15,6 @@ import org.junit.jupiter.api.Tag
|
||||
import org.junit.jupiter.api.TestFactory
|
||||
|
||||
@Tag("kotlin-test")
|
||||
@Tag("k1Kotlin-test")
|
||||
@PredefinedTestCases(
|
||||
TC(
|
||||
name = "default",
|
||||
@@ -31,7 +30,7 @@ import org.junit.jupiter.api.TestFactory
|
||||
)
|
||||
)
|
||||
@UsePartialLinkage(UsePartialLinkage.Mode.DISABLED)
|
||||
class K1KotlinTestLibraryTest : AbstractNativeBlackBoxTest() {
|
||||
class KotlinTestLibraryTest : AbstractNativeBlackBoxTest() {
|
||||
@TestFactory
|
||||
fun default() = dynamicTestCase(TestCaseId.Named("default"))
|
||||
|
||||
@@ -39,8 +38,9 @@ class K1KotlinTestLibraryTest : AbstractNativeBlackBoxTest() {
|
||||
fun worker() = dynamicTestCase(TestCaseId.Named("worker"))
|
||||
}
|
||||
|
||||
@Tag("kotlin-testK2")
|
||||
@Tag("firKotlin-test")
|
||||
@Tag("kotlin-test")
|
||||
@Tag("kotlin-testK2") // TODO: To be removed.
|
||||
@Tag("frontend-fir")
|
||||
@PredefinedTestCases(
|
||||
TC(
|
||||
name = "default",
|
||||
@@ -55,8 +55,9 @@ class StdlibTest : AbstractNativeBlackBoxTest() {
|
||||
fun worker() = dynamicTestCase(TestCaseId.Named("worker"))
|
||||
}
|
||||
|
||||
@Tag("stdlibK2")
|
||||
@Tag("firStdlib")
|
||||
@Tag("stdlib")
|
||||
@Tag("stdlibK2") // TODO: To be removed.
|
||||
@Tag("frontend-fir")
|
||||
@PredefinedTestCases(
|
||||
TC(
|
||||
name = "default",
|
||||
|
||||
Reference in New Issue
Block a user