Add a separate test configurations for JDK 21 dependent test

After it's released, there would be no need in them, but right now
they are unavailable through the toolchain, so we can't require it.
See KT-58765 for tracking

But there should be a dedicated Build configuration with JDK_21_0 env
properly set.

^KT-58716 Fixed
This commit is contained in:
Denis.Zharkov
2023-05-17 18:17:40 +02:00
committed by Space Team
parent 4705207263
commit 67d51eb7ee
17 changed files with 332 additions and 17 deletions
+24 -4
View File
@@ -59,14 +59,34 @@ if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
}
}
fun Test.configureTest(configureJUnit: JUnitPlatformOptions.() -> Unit = {}) {
dependsOn(":dist")
workingDir = rootDir
useJUnitPlatform {
configureJUnit()
}
useJsIrBoxTests(version = version, buildDir = "$buildDir/")
}
projectTest(
jUnitMode = JUnitMode.JUnit5,
defineJDKEnvVariables = listOf(JdkMajorVersion.JDK_1_8, JdkMajorVersion.JDK_11_0, JdkMajorVersion.JDK_17_0)
) {
dependsOn(":dist")
workingDir = rootDir
useJUnitPlatform()
useJsIrBoxTests(version = version, buildDir = "$buildDir/")
configureTest {
excludeTags("Jdk21Test")
}
}
// Separate configuration is only necessary while JDK 21 is not released, so cannot be obtained via toolchain.
// See KT-58765 for tracking
projectTest(
"jdk21Tests",
jUnitMode = JUnitMode.JUnit5,
) {
configureTest {
includeTags("Jdk21Test")
}
}
testsJar()