[TEST] Move generated compiler tests to test-gen directory

This commit is contained in:
Dmitriy Novozhilov
2020-11-27 12:38:10 +03:00
parent 524419a2fe
commit 1ee38286a8
94 changed files with 13 additions and 2 deletions
+11
View File
@@ -1,4 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
import org.jetbrains.kotlin.ideaExt.idea
import java.io.File
plugins {
@@ -69,10 +70,20 @@ dependencies {
antLauncherJar(toolsJar())
}
val generationRoot = projectDir.resolve("tests-gen")
sourceSets {
"main" {}
"test" {
projectDefault()
this.java.srcDir(generationRoot.name)
}
}
if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
apply(plugin = "idea")
idea {
this.module.generatedSourceDirs.add(generationRoot)
}
}
@@ -69,7 +69,7 @@ fun main(args: Array<String>) {
val excludedFirTestdataPattern = "^(.+)\\.fir\\.kts?\$"
testGroupSuite(args) {
testGroup("compiler/tests", "compiler/testData") {
testGroup("compiler/tests-gen", "compiler/testData") {
testClass<AbstractDiagnosticsTestWithFirValidation>(suiteTestClassName = "DiagnosticsTestGenerated") {
model("diagnostics/tests", pattern = "^(.*)\\.kts?$", excludedPattern = excludedFirTestdataPattern)
model("codegen/box/diagnostics")
@@ -590,7 +590,7 @@ fun main(args: Array<String>) {
}
testGroup(
"compiler/tests", "compiler/testData",
"compiler/tests-gen", "compiler/testData",
testRunnerMethodName = "runTestWithCustomIgnoreDirective",
additionalRunnerArguments = listOf("\"// IGNORE_BACKEND_MULTI_MODULE: \"")
) {