Move stub building test generation to analysis generator

This commit is contained in:
Ilya Kirillov
2021-12-20 18:00:33 +03:00
parent 1e9764c639
commit d2832697d9
5 changed files with 23 additions and 20 deletions
@@ -50,7 +50,7 @@ abstract class AbstractClsStubBuilderTest : KotlinTestWithEnvironment() {
registerApplicationService(ClsKotlinBinaryClassCache::class.java, ClsKotlinBinaryClassCache())
}
fun doTest(testDirectory: String) {
fun runTest(testDirectory: String) {
val testDirectoryPath = Paths.get(testDirectory)
val testData = TestData.createFromDirectory(testDirectoryPath)
+1 -5
View File
@@ -756,7 +756,6 @@ tasks {
dependsOn("examplesTest")
dependsOn("nativeCompilerTest")
dependsOn("psiStubTests")
dependsOn(":kotlin-daemon-tests:test")
dependsOn("scriptingTest")
@@ -776,10 +775,6 @@ tasks {
dependsOn(":generators:test")
}
register("psiStubTests") {
dependsOn( ":compiler:psi:cls-psi-file-stub-builder:test")
}
register("toolsTest") {
dependsOn(":tools:kotlinp:test")
dependsOn(":native:kotlin-klib-commonizer:test")
@@ -818,6 +813,7 @@ tasks {
register("frontendApiTests") {
dependsOn("dist")
dependsOn(
":analysis:decompiler:decompiler-to-file-stubs",
":analysis:analysis-api:test",
":analysis:analysis-api-fir:test",
":analysis:analysis-api-fe10:test",
@@ -18,4 +18,5 @@ fun main(args: Array<String>) {
private fun TestGroupSuite.generateTests() {
generateAnalysisApiTests()
generateFirLowLevelApiTests()
generateDecompiledTests()
}
@@ -0,0 +1,20 @@
/*
* 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.
*/
package org.jetbrains.kotlin.generators.tests.analysis.api
import org.jetbrains.kotlin.analysis.decompiler.stub.files.AbstractClsStubBuilderTest
import org.jetbrains.kotlin.generators.TestGroupSuite
internal fun TestGroupSuite.generateDecompiledTests() {
testGroup(
"analysis/decompiled/decompiler-to-file-stubs/tests",
"analysis/decompiled/decompiler-to-file-stubs/testData",
) {
testClass<AbstractClsStubBuilderTest> {
model("clsFileStubBuilder", extension = null, recursive = false)
}
}
}
@@ -18,7 +18,6 @@ import org.jetbrains.kotlin.android.synthetic.test.AbstractAndroidSyntheticPrope
import org.jetbrains.kotlin.fir.plugin.runners.AbstractFirPluginBlackBoxCodegenTest
import org.jetbrains.kotlin.fir.plugin.runners.AbstractFirPluginDiagnosticTest
import org.jetbrains.kotlin.generators.TestGroup
import org.jetbrains.kotlin.generators.TestGroupSuite
import org.jetbrains.kotlin.generators.generateTestGroupSuiteWithJUnit5
import org.jetbrains.kotlin.generators.impl.generateTestGroupSuite
import org.jetbrains.kotlin.incremental.*
@@ -32,7 +31,6 @@ import org.jetbrains.kotlin.kapt3.test.AbstractKotlinKaptContextTest
import org.jetbrains.kotlin.lombok.AbstractLombokCompileTest
import org.jetbrains.kotlin.noarg.*
import org.jetbrains.kotlin.parcelize.test.runners.*
import org.jetbrains.kotlin.psi.stubs.file.builder.AbstractClsStubBuilderTest
import org.jetbrains.kotlin.samWithReceiver.AbstractSamWithReceiverScriptTest
import org.jetbrains.kotlin.samWithReceiver.AbstractSamWithReceiverTest
import org.jetbrains.kotlin.test.TargetBackend
@@ -44,7 +42,6 @@ import org.jetbrains.kotlinx.atomicfu.AbstractAtomicfuJsIrTest
fun main(args: Array<String>) {
System.setProperty("java.awt.headless", "true")
generateTestGroupSuite(args) {
generateStubBuilderTests()
testGroup("compiler/incremental-compilation-impl/test", "jps-plugin/testData") {
fun incrementalJvmTestData(targetBackend: TargetBackend): TestGroup.TestClass.() -> Unit = {
model("incremental/pureKotlin", extension = null, recursive = false, targetBackend = targetBackend)
@@ -412,14 +409,3 @@ fun main(args: Array<String>) {
}
}
}
private fun TestGroupSuite.generateStubBuilderTests() {
testGroup(
"compiler/psi/cls-psi-file-stub-builder/tests",
"compiler/psi/cls-psi-file-stub-builder/testData",
) {
testClass<AbstractClsStubBuilderTest> {
model("clsFileStubBuilder", extension = null, recursive = false)
}
}
}