DryRun mode for GenerateTests is added
Relates to #KTI-17
This commit is contained in:
+30
-28
@@ -20,48 +20,50 @@ import org.jetbrains.kotlin.checkers.AbstractForeignJava8AnnotationsNoAnnotation
|
||||
import org.jetbrains.kotlin.checkers.AbstractForeignJava8AnnotationsNoAnnotationInClasspathWithPsiClassReadingTest
|
||||
import org.jetbrains.kotlin.checkers.AbstractForeignJava8AnnotationsTest
|
||||
import org.jetbrains.kotlin.checkers.javac.AbstractJavacForeignJava8AnnotationsTest
|
||||
import org.jetbrains.kotlin.generators.tests.generator.testGroup
|
||||
import org.jetbrains.kotlin.generators.tests.generator.testGroupSuite
|
||||
import org.jetbrains.kotlin.jvm.compiler.AbstractLoadJava8Test
|
||||
import org.jetbrains.kotlin.jvm.compiler.AbstractLoadJava8WithPsiClassReadingTest
|
||||
import org.jetbrains.kotlin.jvm.compiler.javac.AbstractLoadJava8UsingJavacTest
|
||||
import org.jetbrains.kotlin.resolve.calls.AbstractEnhancedSignaturesResolvedCallsTest
|
||||
|
||||
fun main() {
|
||||
fun main(args: Array<String>) {
|
||||
System.setProperty("java.awt.headless", "true")
|
||||
|
||||
testGroup("compiler/tests-java8/tests", "compiler/testData") {
|
||||
testClass<AbstractForeignJava8AnnotationsTest> {
|
||||
model("foreignAnnotationsJava8/tests")
|
||||
}
|
||||
testGroupSuite(args) {
|
||||
testGroup("compiler/tests-java8/tests", "compiler/testData") {
|
||||
testClass<AbstractForeignJava8AnnotationsTest> {
|
||||
model("foreignAnnotationsJava8/tests")
|
||||
}
|
||||
|
||||
testClass<AbstractJavacForeignJava8AnnotationsTest> {
|
||||
model("foreignAnnotationsJava8/tests")
|
||||
}
|
||||
testClass<AbstractJavacForeignJava8AnnotationsTest> {
|
||||
model("foreignAnnotationsJava8/tests")
|
||||
}
|
||||
|
||||
testClass<AbstractForeignJava8AnnotationsNoAnnotationInClasspathTest> {
|
||||
model("foreignAnnotationsJava8/tests")
|
||||
}
|
||||
testClass<AbstractForeignJava8AnnotationsNoAnnotationInClasspathTest> {
|
||||
model("foreignAnnotationsJava8/tests")
|
||||
}
|
||||
|
||||
testClass<AbstractForeignJava8AnnotationsNoAnnotationInClasspathWithPsiClassReadingTest> {
|
||||
model("foreignAnnotationsJava8/tests")
|
||||
}
|
||||
testClass<AbstractForeignJava8AnnotationsNoAnnotationInClasspathWithPsiClassReadingTest> {
|
||||
model("foreignAnnotationsJava8/tests")
|
||||
}
|
||||
|
||||
testClass<AbstractLoadJava8Test> {
|
||||
model("loadJava8/compiledJava", extension = "java", testMethod = "doTestCompiledJava")
|
||||
model("loadJava8/sourceJava", extension = "java", testMethod = "doTestSourceJava")
|
||||
}
|
||||
testClass<AbstractLoadJava8Test> {
|
||||
model("loadJava8/compiledJava", extension = "java", testMethod = "doTestCompiledJava")
|
||||
model("loadJava8/sourceJava", extension = "java", testMethod = "doTestSourceJava")
|
||||
}
|
||||
|
||||
testClass<AbstractLoadJava8UsingJavacTest> {
|
||||
model("loadJava8/compiledJava", extension = "java", testMethod = "doTestCompiledJava")
|
||||
model("loadJava8/sourceJava", extension = "java", testMethod = "doTestSourceJava")
|
||||
}
|
||||
testClass<AbstractLoadJava8UsingJavacTest> {
|
||||
model("loadJava8/compiledJava", extension = "java", testMethod = "doTestCompiledJava")
|
||||
model("loadJava8/sourceJava", extension = "java", testMethod = "doTestSourceJava")
|
||||
}
|
||||
|
||||
testClass<AbstractLoadJava8WithPsiClassReadingTest> {
|
||||
model("loadJava8/compiledJava", extension = "java", testMethod = "doTestCompiledJava")
|
||||
}
|
||||
testClass<AbstractLoadJava8WithPsiClassReadingTest> {
|
||||
model("loadJava8/compiledJava", extension = "java", testMethod = "doTestCompiledJava")
|
||||
}
|
||||
|
||||
testClass<AbstractEnhancedSignaturesResolvedCallsTest> {
|
||||
model("resolvedCalls/enhancedSignatures")
|
||||
testClass<AbstractEnhancedSignaturesResolvedCallsTest> {
|
||||
model("resolvedCalls/enhancedSignatures")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+27
-25
@@ -5,7 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.spec.utils.tasks
|
||||
|
||||
import org.jetbrains.kotlin.generators.tests.generator.testGroup
|
||||
import org.jetbrains.kotlin.generators.tests.generator.testGroupSuite
|
||||
import org.jetbrains.kotlin.spec.checkers.AbstractDiagnosticsTestSpec
|
||||
import org.jetbrains.kotlin.spec.checkers.AbstractFirDiagnosticsTestSpec
|
||||
import org.jetbrains.kotlin.spec.codegen.AbstractBlackBoxCodegenTestSpec
|
||||
@@ -38,32 +38,34 @@ fun detectDirsWithTestsMapFileOnly(dirName: String): List<String> {
|
||||
fun generateTests() {
|
||||
val excludedFirTestdataPattern = "^(.+)\\.fir\\.kts?\$"
|
||||
|
||||
testGroup(SPEC_TEST_PATH, SPEC_TESTDATA_PATH) {
|
||||
testClass<AbstractDiagnosticsTestSpec> {
|
||||
model(
|
||||
"diagnostics",
|
||||
excludeDirs = listOf("helpers") + detectDirsWithTestsMapFileOnly("diagnostics"),
|
||||
excludedPattern = excludedFirTestdataPattern
|
||||
)
|
||||
}
|
||||
testGroupSuite {
|
||||
testGroup(SPEC_TEST_PATH, SPEC_TESTDATA_PATH) {
|
||||
testClass<AbstractDiagnosticsTestSpec> {
|
||||
model(
|
||||
"diagnostics",
|
||||
excludeDirs = listOf("helpers") + detectDirsWithTestsMapFileOnly("diagnostics"),
|
||||
excludedPattern = excludedFirTestdataPattern
|
||||
)
|
||||
}
|
||||
|
||||
testClass<AbstractFirDiagnosticsTestSpec> {
|
||||
model(
|
||||
"diagnostics",
|
||||
excludeDirs = listOf("helpers") + detectDirsWithTestsMapFileOnly("diagnostics"),
|
||||
excludedPattern = excludedFirTestdataPattern
|
||||
)
|
||||
}
|
||||
testClass<AbstractFirDiagnosticsTestSpec> {
|
||||
model(
|
||||
"diagnostics",
|
||||
excludeDirs = listOf("helpers") + detectDirsWithTestsMapFileOnly("diagnostics"),
|
||||
excludedPattern = excludedFirTestdataPattern
|
||||
)
|
||||
}
|
||||
|
||||
testClass<AbstractParsingTestSpec> {
|
||||
model(
|
||||
relativeRootPath = "psi",
|
||||
testMethod = "doParsingTest",
|
||||
excludeDirs = listOf("helpers", "templates") + detectDirsWithTestsMapFileOnly("psi")
|
||||
)
|
||||
}
|
||||
testClass<AbstractBlackBoxCodegenTestSpec> {
|
||||
model("codegen/box", excludeDirs = listOf("helpers", "templates") + detectDirsWithTestsMapFileOnly("codegen/box"))
|
||||
testClass<AbstractParsingTestSpec> {
|
||||
model(
|
||||
relativeRootPath = "psi",
|
||||
testMethod = "doParsingTest",
|
||||
excludeDirs = listOf("helpers", "templates") + detectDirsWithTestsMapFileOnly("psi")
|
||||
)
|
||||
}
|
||||
testClass<AbstractBlackBoxCodegenTestSpec> {
|
||||
model("codegen/box", excludeDirs = listOf("helpers", "templates") + detectDirsWithTestsMapFileOnly("codegen/box"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user