[TEST] Move generated fir tests to test-gen directories
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
import org.jetbrains.kotlin.ideaExt.idea
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 2000-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2000-2018 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.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
@@ -29,9 +31,21 @@ dependencies {
|
|||||||
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val generationRoot = projectDir.resolve("tests-gen")
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
"main" { none() }
|
"main" { none() }
|
||||||
"test" { projectDefault() }
|
"test" {
|
||||||
|
projectDefault()
|
||||||
|
this.java.srcDir(generationRoot.name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
|
||||||
|
apply(plugin = "idea")
|
||||||
|
idea {
|
||||||
|
this.module.generatedSourceDirs.add(generationRoot)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
projectTest(parallel = true) {
|
projectTest(parallel = true) {
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import org.jetbrains.kotlin.ideaExt.idea
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
id("jps-compatible")
|
id("jps-compatible")
|
||||||
@@ -34,9 +36,21 @@ dependencies {
|
|||||||
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val generationRoot = projectDir.resolve("tests-gen")
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
"main" { projectDefault() }
|
"main" { projectDefault() }
|
||||||
"test" { projectDefault() }
|
"test" {
|
||||||
|
projectDefault()
|
||||||
|
this.java.srcDir(generationRoot.name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
|
||||||
|
apply(plugin = "idea")
|
||||||
|
idea {
|
||||||
|
this.module.generatedSourceDirs.add(generationRoot)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
projectTest(parallel = true) {
|
projectTest(parallel = true) {
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import org.jetbrains.kotlin.ideaExt.idea
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
id("jps-compatible")
|
id("jps-compatible")
|
||||||
@@ -41,9 +43,21 @@ dependencies {
|
|||||||
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val generationRoot = projectDir.resolve("tests-gen")
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
"main" { projectDefault() }
|
"main" { projectDefault() }
|
||||||
"test" { projectDefault() }
|
"test" {
|
||||||
|
projectDefault()
|
||||||
|
this.java.srcDir(generationRoot.name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
|
||||||
|
apply(plugin = "idea")
|
||||||
|
idea {
|
||||||
|
this.module.generatedSourceDirs.add(generationRoot)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
projectTest {
|
projectTest {
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import org.jetbrains.kotlin.ideaExt.idea
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 2000-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2000-2018 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.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
@@ -31,9 +33,21 @@ dependencies {
|
|||||||
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val generationRoot = projectDir.resolve("tests-gen")
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
"main" { projectDefault() }
|
"main" { projectDefault() }
|
||||||
"test" { projectDefault() }
|
"test" {
|
||||||
|
projectDefault()
|
||||||
|
this.java.srcDir(generationRoot.name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
|
||||||
|
apply(plugin = "idea")
|
||||||
|
idea {
|
||||||
|
this.module.generatedSourceDirs.add(generationRoot)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
projectTest(parallel = true) {
|
projectTest(parallel = true) {
|
||||||
|
|||||||
@@ -564,7 +564,7 @@ fun main(args: Array<String>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
testGroup(
|
testGroup(
|
||||||
"compiler/fir/fir2ir/tests", "compiler/testData",
|
"compiler/fir/fir2ir/tests-gen", "compiler/testData",
|
||||||
testRunnerMethodName = "runTestWithCustomIgnoreDirective",
|
testRunnerMethodName = "runTestWithCustomIgnoreDirective",
|
||||||
additionalRunnerArguments = listOf("\"// IGNORE_BACKEND_FIR: \"")
|
additionalRunnerArguments = listOf("\"// IGNORE_BACKEND_FIR: \"")
|
||||||
) {
|
) {
|
||||||
@@ -612,7 +612,7 @@ fun main(args: Array<String>) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
testGroup("compiler/fir/raw-fir/psi2fir/tests", "compiler/fir/raw-fir/psi2fir/testData") {
|
testGroup("compiler/fir/raw-fir/psi2fir/tests-gen", "compiler/fir/raw-fir/psi2fir/testData") {
|
||||||
testClass<AbstractRawFirBuilderTestCase> {
|
testClass<AbstractRawFirBuilderTestCase> {
|
||||||
model("rawBuilder", testMethod = "doRawFirTest")
|
model("rawBuilder", testMethod = "doRawFirTest")
|
||||||
}
|
}
|
||||||
@@ -626,19 +626,19 @@ fun main(args: Array<String>) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
testGroup("compiler/fir/raw-fir/psi2fir/tests", "compiler/fir/raw-fir/psi2fir/testData") {
|
testGroup("compiler/fir/raw-fir/psi2fir/tests-gen", "compiler/fir/raw-fir/psi2fir/testData") {
|
||||||
testClass<AbstractPartialRawFirBuilderTestCase> {
|
testClass<AbstractPartialRawFirBuilderTestCase> {
|
||||||
model("partialRawBuilder", testMethod = "doRawFirTest")
|
model("partialRawBuilder", testMethod = "doRawFirTest")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
testGroup("compiler/fir/raw-fir/light-tree2fir/tests", "compiler/fir/raw-fir/psi2fir/testData") {
|
testGroup("compiler/fir/raw-fir/light-tree2fir/tests-gen", "compiler/fir/raw-fir/psi2fir/testData") {
|
||||||
testClass<AbstractLightTree2FirConverterTestCase> {
|
testClass<AbstractLightTree2FirConverterTestCase> {
|
||||||
model("rawBuilder")
|
model("rawBuilder")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
testGroup("compiler/fir/analysis-tests/tests", "compiler/fir/analysis-tests/testData") {
|
testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/fir/analysis-tests/testData") {
|
||||||
testClass<AbstractFirDiagnosticsTest> {
|
testClass<AbstractFirDiagnosticsTest> {
|
||||||
model("resolve", pattern = KT_WITHOUT_DOTS_IN_NAME)
|
model("resolve", pattern = KT_WITHOUT_DOTS_IN_NAME)
|
||||||
}
|
}
|
||||||
@@ -653,31 +653,31 @@ fun main(args: Array<String>) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
testGroup("compiler/fir/analysis-tests/tests", "compiler/fir/analysis-tests/testData") {
|
testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/fir/analysis-tests/testData") {
|
||||||
testClass<AbstractFirDiagnosticsWithStdlibTest> {
|
testClass<AbstractFirDiagnosticsWithStdlibTest> {
|
||||||
model("resolveWithStdlib", pattern = KT_WITHOUT_DOTS_IN_NAME)
|
model("resolveWithStdlib", pattern = KT_WITHOUT_DOTS_IN_NAME)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
testGroup("compiler/fir/analysis-tests/tests", "compiler/testData") {
|
testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/testData") {
|
||||||
testClass<AbstractFirLoadCompiledKotlin> {
|
testClass<AbstractFirLoadCompiledKotlin> {
|
||||||
model("loadJava/compiledKotlin", extension = "kt")
|
model("loadJava/compiledKotlin", extension = "kt")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
testGroup("compiler/fir/analysis-tests/tests", "compiler/testData") {
|
testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/testData") {
|
||||||
testClass<AbstractFirTypeEnhancementTest> {
|
testClass<AbstractFirTypeEnhancementTest> {
|
||||||
model("loadJava/compiledJava", extension = "java")
|
model("loadJava/compiledJava", extension = "java")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
testGroup("compiler/fir/analysis-tests/tests", "compiler/fir/analysis-tests/testData") {
|
testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/fir/analysis-tests/testData") {
|
||||||
testClass<AbstractOwnFirTypeEnhancementTest> {
|
testClass<AbstractOwnFirTypeEnhancementTest> {
|
||||||
model("enhancement", extension = "java")
|
model("enhancement", extension = "java")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
testGroup("compiler/fir/analysis-tests/tests", "compiler/testData") {
|
testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/testData") {
|
||||||
testClass<AbstractFirOldFrontendDiagnosticsTest> {
|
testClass<AbstractFirOldFrontendDiagnosticsTest> {
|
||||||
model("diagnostics/tests", excludedPattern = excludedFirTestdataPattern)
|
model("diagnostics/tests", excludedPattern = excludedFirTestdataPattern)
|
||||||
}
|
}
|
||||||
@@ -691,14 +691,14 @@ fun main(args: Array<String>) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
testGroup("compiler/fir/analysis-tests/tests", "compiler/fir/analysis-tests/testData") {
|
testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/fir/analysis-tests/testData") {
|
||||||
testClass<AbstractFirOldFrontendLightClassesTest> {
|
testClass<AbstractFirOldFrontendLightClassesTest> {
|
||||||
model("lightClasses")
|
model("lightClasses")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
testGroup(
|
testGroup(
|
||||||
"compiler/fir/fir2ir/tests", "compiler/testData",
|
"compiler/fir/fir2ir/tests-gen", "compiler/testData",
|
||||||
testRunnerMethodName = "runTestWithCustomIgnoreDirective",
|
testRunnerMethodName = "runTestWithCustomIgnoreDirective",
|
||||||
additionalRunnerArguments = listOf("\"// IGNORE_BACKEND_FIR: \"")
|
additionalRunnerArguments = listOf("\"// IGNORE_BACKEND_FIR: \"")
|
||||||
) {
|
) {
|
||||||
@@ -727,13 +727,13 @@ fun main(args: Array<String>) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
testGroup("compiler/fir/analysis-tests/tests", "compiler/fir/analysis-tests/testData") {
|
testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/fir/analysis-tests/testData") {
|
||||||
testClass<AbstractExtendedFirDiagnosticsTest> {
|
testClass<AbstractExtendedFirDiagnosticsTest> {
|
||||||
model("extendedCheckers", pattern = KT_WITHOUT_DOTS_IN_NAME)
|
model("extendedCheckers", pattern = KT_WITHOUT_DOTS_IN_NAME)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
testGroup("compiler/fir/analysis-tests/tests", "compiler/fir/analysis-tests/testData") {
|
testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/fir/analysis-tests/testData") {
|
||||||
testClass<AbstractExtendedFirWithLightTreeDiagnosticsTest> {
|
testClass<AbstractExtendedFirWithLightTreeDiagnosticsTest> {
|
||||||
model("extendedCheckers", pattern = KT_WITHOUT_DOTS_IN_NAME)
|
model("extendedCheckers", pattern = KT_WITHOUT_DOTS_IN_NAME)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user