[JS TESTS] Move generation of js tests to GenerateJsTests
This commit is contained in:
-40
@@ -163,46 +163,6 @@ fun generateJUnit5CompilerTests(args: Array<String>) {
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------- JS tests ----------------------------------------------
|
||||
|
||||
testGroup(testsRoot = "js/js.tests/tests-gen", testDataRoot = "js/js.translator/testData") {
|
||||
testClass<AbstractBoxJsTest> {
|
||||
model("box/", pattern = "^([^_](.+))\\.kt$", excludeDirs = listOf("incremental"))
|
||||
}
|
||||
|
||||
testClass<AbstractSourceMapGenerationSmokeTest> {
|
||||
model("sourcemap/")
|
||||
}
|
||||
|
||||
testClass<AbstractOutputPrefixPostfixTest> {
|
||||
model("outputPrefixPostfix/")
|
||||
}
|
||||
|
||||
testClass<AbstractMultiModuleOrderTest> {
|
||||
model("multiModuleOrder/")
|
||||
}
|
||||
}
|
||||
|
||||
testGroup(testsRoot = "js/js.tests/tests-gen", testDataRoot = "compiler/testData") {
|
||||
val jvmOnlyBoxTests = listOf(
|
||||
"testsWithJava9",
|
||||
"testsWithJava15",
|
||||
"testsWithJava17",
|
||||
)
|
||||
|
||||
testClass<AbstractJsCodegenBoxTest> {
|
||||
model("codegen/box", excludeDirs = jvmOnlyBoxTests + "compileKotlinAgainstKotlin")
|
||||
}
|
||||
|
||||
testClass<AbstractJsCodegenInlineTest> {
|
||||
model("codegen/boxInline")
|
||||
}
|
||||
|
||||
testClass<AbstractJsLegacyPrimitiveArraysBoxTest> {
|
||||
model("codegen/box/arrays")
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------- FIR tests ----------------------------------------------
|
||||
|
||||
testGroup(testsRoot = "compiler/fir/analysis-tests/tests-gen", testDataRoot = "compiler/testData") {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.generators.tests
|
||||
|
||||
import org.jetbrains.kotlin.generators.generateTestGroupSuiteWithJUnit5
|
||||
import org.jetbrains.kotlin.generators.impl.generateTestGroupSuite
|
||||
import org.jetbrains.kotlin.js.test.AbstractDceTest
|
||||
import org.jetbrains.kotlin.js.test.AbstractJsLineNumberTest
|
||||
@@ -18,17 +19,24 @@ import org.jetbrains.kotlin.js.test.semantics.*
|
||||
import org.jetbrains.kotlin.js.test.wasm.semantics.AbstractIrCodegenBoxWasmTest
|
||||
import org.jetbrains.kotlin.js.test.wasm.semantics.AbstractIrCodegenWasmJsInteropWasmTest
|
||||
import org.jetbrains.kotlin.js.test.wasm.semantics.AbstractJsTranslatorWasmTest
|
||||
import org.jetbrains.kotlin.js.testNew.*
|
||||
import org.jetbrains.kotlin.test.TargetBackend
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
System.setProperty("java.awt.headless", "true")
|
||||
|
||||
val jvmOnlyBoxTests = listOf(
|
||||
"testsWithJava9",
|
||||
"testsWithJava15",
|
||||
"testsWithJava17",
|
||||
)
|
||||
|
||||
// TODO: repair these tests
|
||||
//generateTestDataForReservedWords()
|
||||
|
||||
generateTestGroupSuite(args) {
|
||||
testGroup("js/js.tests/tests-gen", "js/js.translator/testData", testRunnerMethodName = "runTest0") {
|
||||
testClass<AbstractBoxJsTest> {
|
||||
testClass<org.jetbrains.kotlin.js.test.semantics.AbstractBoxJsTest> {
|
||||
model("box/incremental/", pattern = "^([^_](.+))\\.kt$", targetBackend = TargetBackend.JS)
|
||||
}
|
||||
|
||||
@@ -63,12 +71,6 @@ fun main(args: Array<String>) {
|
||||
}
|
||||
|
||||
testGroup("js/js.tests/tests-gen", "compiler/testData", testRunnerMethodName = "runTest0") {
|
||||
val jvmOnlyBoxTests = listOf(
|
||||
"testsWithJava9",
|
||||
"testsWithJava15",
|
||||
"testsWithJava17",
|
||||
)
|
||||
|
||||
testClass<AbstractIrJsCodegenBoxTest> {
|
||||
model("codegen/box", targetBackend = TargetBackend.JS_IR, excludeDirs = jvmOnlyBoxTests + "compileKotlinAgainstKotlin")
|
||||
}
|
||||
@@ -121,4 +123,38 @@ fun main(args: Array<String>) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
generateTestGroupSuiteWithJUnit5(args) {
|
||||
testGroup("js/js.tests/tests-gen", "js/js.translator/testData", testRunnerMethodName = "runTest0") {
|
||||
testClass<org.jetbrains.kotlin.js.testNew.AbstractBoxJsTest> {
|
||||
model("box/", pattern = "^([^_](.+))\\.kt$", excludeDirs = listOf("incremental"))
|
||||
}
|
||||
|
||||
testClass<AbstractSourceMapGenerationSmokeTest> {
|
||||
model("sourcemap/")
|
||||
}
|
||||
|
||||
testClass<AbstractOutputPrefixPostfixTest> {
|
||||
model("outputPrefixPostfix/")
|
||||
}
|
||||
|
||||
testClass<AbstractMultiModuleOrderTest> {
|
||||
model("multiModuleOrder/")
|
||||
}
|
||||
}
|
||||
|
||||
testGroup("js/js.tests/tests-gen", "compiler/testData", testRunnerMethodName = "runTest0") {
|
||||
testClass<AbstractJsCodegenBoxTest> {
|
||||
model("codegen/box", excludeDirs = jvmOnlyBoxTests + "compileKotlinAgainstKotlin")
|
||||
}
|
||||
|
||||
testClass<AbstractJsCodegenInlineTest> {
|
||||
model("codegen/boxInline")
|
||||
}
|
||||
|
||||
testClass<AbstractJsLegacyPrimitiveArraysBoxTest> {
|
||||
model("codegen/box/arrays")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user