[Test] Move fir backend tests back to :compiler:fir2ir module

This commit is contained in:
Dmitriy Novozhilov
2021-01-28 12:50:25 +03:00
parent e79d02f482
commit 2ae35b0b08
8 changed files with 19 additions and 18 deletions
+14 -5
View File
@@ -21,16 +21,24 @@ dependencies {
testRuntimeOnly(intellijDep())
testApi(commonDep("junit:junit"))
testCompileOnly(project(":kotlin-test:kotlin-test-jvm"))
testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
testApi(projectTests(":compiler:tests-common"))
testApi(projectTests(":compiler:fir:analysis-tests:legacy-fir-tests"))
testApi(project(":compiler:resolution.common"))
testApi(projectTests(":compiler:test-infrastructure"))
testApi(projectTests(":compiler:test-infrastructure-utils"))
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"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":core:descriptors.runtime"))
testRuntimeOnly(project(":compiler:fir:fir2ir:jvm-backend"))
testCompileOnly(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
useJUnitPlatform()
}
testsJar()
@@ -27,7 +27,6 @@ import org.junit.runner.RunWith
CompileKotlinAgainstInlineKotlinTestGenerated::class
)
@IncludeClassNamePatterns(".*Test.*Generated")
@Execution(ExecutionMode.SAME_THREAD)
@UseTechnicalNames
abstract class CustomJvmTargetOnJvmBaseTest
@@ -122,7 +122,9 @@ fun generateJUnit5CompilerTests(args: Array<String>) {
model("diagnostics/tests", excludedPattern = excludedFirTestdataPattern)
model("diagnostics/testsWithStdLib", excludedPattern = excludedFirTestdataPattern)
}
}
testGroup(testsRoot = "compiler/fir/fir2ir/tests-gen", testDataRoot = "compiler/testData") {
testClass<AbstractFirBlackBoxCodegenTest> {
model("codegen/box", 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> {
model("ir/irText")
}
+2 -11
View File
@@ -63,18 +63,9 @@ fun setupGenerateAllTestsRunConfiguration() {
// Needed because of idea.ext plugin doesn't allow to set TEST_SEARCH_SCOPE = moduleWithDependencies
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") }
junit.moduleName = "kotlin.compiler.fir.analysis-tests.test"
junit.pattern = tests.joinToString(separator = "|", prefix = "^(", postfix = ")\$")
junit.moduleName = "kotlin.compiler.fir.fir2ir.test"
junit.pattern = """^.*\.Fir\w+TestGenerated$"""
junit.vmParameters = junit.vmParameters.replace(rootDir.absolutePath, "\$PROJECT_DIR\$")
junit.workingDirectory = junit.workingDirectory.replace(rootDir.absolutePath, "\$PROJECT_DIR\$")