Skip to content

Commit 4af0f11

Browse files
Abduqodiri QurbonzodaSpace Team
authored andcommitted
Fix 'Test: stdlib-js public kotlin api test' IDEA run configuration
Moving tests to another package made the IDEA run configuration obsolete. To prevent this problem in the future a separate task (jsStdlibApiTest) was introduced. The task is run in TC and will fail if the tests are missing. Merge-request: KT-MR-8128 Merged-by: Abduqodiri Qurbonzoda <[email protected]>
1 parent 0e23ffc commit 4af0f11

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

.idea/runConfigurations/Test__stdlib_js_public_kotlin_api_test__overwrite_results.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,7 @@ tasks {
613613

614614
register("jsIrCompilerTest") {
615615
dependsOn(":js:js.tests:jsIrTest")
616+
dependsOn(":js:js.tests:jsStdlibApiTest")
616617
}
617618

618619
register("wasmCompilerTest") {

js/js.tests/build.gradle.kts

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ fun Test.setUpJsBoxTests(jsEnabled: Boolean, jsIrEnabled: Boolean, firEnabled: B
314314
}
315315

316316
exclude("org/jetbrains/kotlin/js/testOld/wasm/semantics/*")
317+
exclude("org/jetbrains/kotlin/js/testOld/api/*")
317318

318319
if (jsEnabled && !jsIrEnabled) {
319320
include("org/jetbrains/kotlin/integration/AntTaskJsTest.class")
@@ -330,7 +331,6 @@ fun Test.setUpJsBoxTests(jsEnabled: Boolean, jsIrEnabled: Boolean, firEnabled: B
330331
include("org/jetbrains/kotlin/js/test/ir/*")
331332

332333
include("org/jetbrains/kotlin/incremental/*")
333-
include("org/jetbrains/kotlin/js/testOld/api/*")
334334
include("org/jetbrains/kotlin/js/testOld/compatibility/binary/JsKlibBinaryCompatibilityTestGenerated.class")
335335
include("org/jetbrains/kotlin/benchmarks/GenerateIrRuntime.class")
336336
include("org/jetbrains/kotlin/integration/JsIrAnalysisHandlerExtensionTest.class")
@@ -381,8 +381,6 @@ val test = projectTest(parallel = true, jUnitMode = JUnitMode.JUnit5, maxHeapSiz
381381
inputs.dir(testDataDir)
382382
inputs.dir(rootDir.resolve("dist"))
383383
inputs.dir(rootDir.resolve("compiler/testData"))
384-
inputs.dir(rootDir.resolve("libraries/stdlib/api/js"))
385-
inputs.dir(rootDir.resolve("libraries/stdlib/api/js-v1"))
386384

387385
outputs.dir("$buildDir/out")
388386
outputs.dir("$buildDir/out-min")
@@ -411,6 +409,27 @@ projectTest("quickTest", parallel = true, jUnitMode = JUnitMode.JUnit5, maxHeapS
411409
useJUnitPlatform()
412410
}
413411

412+
projectTest("jsStdlibApiTest", parallel = true, maxHeapSizeMb = 4096) {
413+
setupV8()
414+
setupNodeJs()
415+
dependsOn(npmInstall)
416+
417+
dependsOn(":dist")
418+
inputs.dir(rootDir.resolve("dist"))
419+
420+
include("org/jetbrains/kotlin/js/testOld/api/*")
421+
inputs.dir(rootDir.resolve("libraries/stdlib/api/js"))
422+
inputs.dir(rootDir.resolve("libraries/stdlib/api/js-v1"))
423+
424+
dependsOn(":kotlin-stdlib-js-ir:compileKotlinJs")
425+
systemProperty("kotlin.js.full.stdlib.path", "libraries/stdlib/js-ir/build/classes/kotlin/js/main")
426+
inputs.dir(rootDir.resolve("libraries/stdlib/js-ir/build/classes/kotlin/js/main"))
427+
428+
setTestNameIncludePatterns(listOf("org.jetbrains.kotlin.js.testOld.api.ApiTest.*"))
429+
430+
setUpBoxTests()
431+
}
432+
414433
testsJar {}
415434

416435
val generateTests by generator("org.jetbrains.kotlin.generators.tests.GenerateJsTestsKt") {

0 commit comments

Comments
 (0)