[Test] Move fir backend tests back to :compiler:fir2ir module
This commit is contained in:
@@ -21,16 +21,24 @@ dependencies {
|
|||||||
|
|
||||||
testRuntimeOnly(intellijDep())
|
testRuntimeOnly(intellijDep())
|
||||||
|
|
||||||
testApi(commonDep("junit:junit"))
|
|
||||||
testCompileOnly(project(":kotlin-test:kotlin-test-jvm"))
|
testCompileOnly(project(":kotlin-test:kotlin-test-jvm"))
|
||||||
testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
|
testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
|
||||||
testApi(projectTests(":compiler:tests-common"))
|
testApi(projectTests(":compiler:test-infrastructure"))
|
||||||
testApi(projectTests(":compiler:fir:analysis-tests:legacy-fir-tests"))
|
testApi(projectTests(":compiler:test-infrastructure-utils"))
|
||||||
testApi(project(":compiler:resolution.common"))
|
testApi(projectTests(":compiler:tests-compiler-utils"))
|
||||||
|
testApi(projectTests(":compiler:tests-common-new"))
|
||||||
|
testApi(projectTests(":compiler:fir:analysis-tests"))
|
||||||
|
testApi(project(":compiler:fir:fir-serialization"))
|
||||||
|
|
||||||
|
testApi(platform("org.junit:junit-bom:5.7.0"))
|
||||||
|
testApi("org.junit.jupiter:junit-jupiter")
|
||||||
|
testApi("org.junit.platform:junit-platform-commons:1.7.0")
|
||||||
|
testApi("org.junit.platform:junit-platform-launcher:1.7.0")
|
||||||
|
|
||||||
testCompileOnly(project(":kotlin-reflect-api"))
|
testCompileOnly(project(":kotlin-reflect-api"))
|
||||||
testRuntimeOnly(project(":kotlin-reflect"))
|
testRuntimeOnly(project(":kotlin-reflect"))
|
||||||
testRuntimeOnly(project(":core:descriptors.runtime"))
|
testRuntimeOnly(project(":core:descriptors.runtime"))
|
||||||
|
testRuntimeOnly(project(":compiler:fir:fir2ir:jvm-backend"))
|
||||||
|
|
||||||
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
||||||
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
||||||
@@ -53,8 +61,9 @@ if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
projectTest(parallel = true) {
|
projectTest(parallel = true, jUnit5Enabled = true) {
|
||||||
workingDir = rootDir
|
workingDir = rootDir
|
||||||
|
useJUnitPlatform()
|
||||||
}
|
}
|
||||||
|
|
||||||
testsJar()
|
testsJar()
|
||||||
|
|||||||
-1
@@ -27,7 +27,6 @@ import org.junit.runner.RunWith
|
|||||||
CompileKotlinAgainstInlineKotlinTestGenerated::class
|
CompileKotlinAgainstInlineKotlinTestGenerated::class
|
||||||
)
|
)
|
||||||
@IncludeClassNamePatterns(".*Test.*Generated")
|
@IncludeClassNamePatterns(".*Test.*Generated")
|
||||||
@Execution(ExecutionMode.SAME_THREAD)
|
|
||||||
@UseTechnicalNames
|
@UseTechnicalNames
|
||||||
abstract class CustomJvmTargetOnJvmBaseTest
|
abstract class CustomJvmTargetOnJvmBaseTest
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -122,7 +122,9 @@ fun generateJUnit5CompilerTests(args: Array<String>) {
|
|||||||
model("diagnostics/tests", excludedPattern = excludedFirTestdataPattern)
|
model("diagnostics/tests", excludedPattern = excludedFirTestdataPattern)
|
||||||
model("diagnostics/testsWithStdLib", excludedPattern = excludedFirTestdataPattern)
|
model("diagnostics/testsWithStdLib", excludedPattern = excludedFirTestdataPattern)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
testGroup(testsRoot = "compiler/fir/fir2ir/tests-gen", testDataRoot = "compiler/testData") {
|
||||||
testClass<AbstractFirBlackBoxCodegenTest> {
|
testClass<AbstractFirBlackBoxCodegenTest> {
|
||||||
model("codegen/box", excludeDirs = listOf("oldLanguageVersions"))
|
model("codegen/box", excludeDirs = listOf("oldLanguageVersions"))
|
||||||
model("codegen/boxAgainstJava", excludeDirs = listOf("oldLanguageVersions"))
|
model("codegen/boxAgainstJava", excludeDirs = listOf("oldLanguageVersions"))
|
||||||
@@ -147,7 +149,7 @@ fun generateJUnit5CompilerTests(args: Array<String>) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
testGroup(testsRoot = "compiler/fir/analysis-tests/tests-gen", testDataRoot = "compiler/testData") {
|
testGroup(testsRoot = "compiler/fir/fir2ir/tests-gen", testDataRoot = "compiler/testData") {
|
||||||
testClass<AbstractFir2IrTextTest> {
|
testClass<AbstractFir2IrTextTest> {
|
||||||
model("ir/irText")
|
model("ir/irText")
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-11
@@ -63,18 +63,9 @@ fun setupGenerateAllTestsRunConfiguration() {
|
|||||||
// Needed because of idea.ext plugin doesn't allow to set TEST_SEARCH_SCOPE = moduleWithDependencies
|
// Needed because of idea.ext plugin doesn't allow to set TEST_SEARCH_SCOPE = moduleWithDependencies
|
||||||
fun setupFirRunConfiguration() {
|
fun setupFirRunConfiguration() {
|
||||||
|
|
||||||
val tests = listOf(
|
|
||||||
"org\\.jetbrains\\.kotlin\\.test\\.runners\\.FirDiagnosticsWithLightTreeTestGenerated",
|
|
||||||
"org\\.jetbrains\\.kotlin\\.test\\.runners\\.FirDiagnosticTestGenerated",
|
|
||||||
"org\\.jetbrains\\.kotlin\\.test\\.runners\\.FirDiagnosticTestSpecGenerated",
|
|
||||||
"org\\.jetbrains\\.kotlin\\.test\\.runners\\.FirOldFrontendDiagnosticsTestGenerated",
|
|
||||||
"org\\.jetbrains\\.kotlin\\.test\\.runners\\.ir\\.Fir2IrTextTestGenerated",
|
|
||||||
"org\\.jetbrains\\.kotlin\\.test\\.runners\\.codegen\\.FirBlackBoxCodegenTestGenerated"
|
|
||||||
)
|
|
||||||
|
|
||||||
val junit = JUnit("_stub").apply { configureForKotlin("2048m") }
|
val junit = JUnit("_stub").apply { configureForKotlin("2048m") }
|
||||||
junit.moduleName = "kotlin.compiler.fir.analysis-tests.test"
|
junit.moduleName = "kotlin.compiler.fir.fir2ir.test"
|
||||||
junit.pattern = tests.joinToString(separator = "|", prefix = "^(", postfix = ")\$")
|
junit.pattern = """^.*\.Fir\w+TestGenerated$"""
|
||||||
junit.vmParameters = junit.vmParameters.replace(rootDir.absolutePath, "\$PROJECT_DIR\$")
|
junit.vmParameters = junit.vmParameters.replace(rootDir.absolutePath, "\$PROJECT_DIR\$")
|
||||||
junit.workingDirectory = junit.workingDirectory.replace(rootDir.absolutePath, "\$PROJECT_DIR\$")
|
junit.workingDirectory = junit.workingDirectory.replace(rootDir.absolutePath, "\$PROJECT_DIR\$")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user