Run tests on different JDKs via different suites and custom test runner

This commit is contained in:
Mikhael Bogdanov
2018-10-17 17:20:19 +02:00
parent 55880ef013
commit db25343f90
3 changed files with 118 additions and 8 deletions
+2 -8
View File
@@ -117,6 +117,7 @@ projectTest {
systemProperty("kotlin.ant.classpath", antLauncherJar.asPath)
systemProperty("kotlin.ant.launcher.class", "org.apache.tools.ant.Main")
}
exclude("org/jetbrains/kotlin/codegen/jdk/JvmTarget*")
}
fun Project.codegenTest(target: Int, jvm: Int,
@@ -125,15 +126,8 @@ fun Project.codegenTest(target: Int, jvm: Int,
dependsOn(*testDistProjects.map { "$it:dist" }.toTypedArray())
workingDir = rootDir
filter.includeTestsMatching("org.jetbrains.kotlin.codegen.BlackBoxCodegenTestGenerated*")
filter.includeTestsMatching("org.jetbrains.kotlin.codegen.BlackBoxInlineCodegenTestGenerated*")
filter.includeTestsMatching("org.jetbrains.kotlin.codegen.CompileKotlinAgainstInlineKotlinTestGenerated*")
filter.includeTestsMatching("org.jetbrains.kotlin.codegen.CompileKotlinAgainstKotlinTestGenerated*")
filter.includeTestsMatching("org.jetbrains.kotlin.codegen.BlackBoxAgainstJavaCodegenTestGenerated*")
filter.includeTestsMatching("org.jetbrains.kotlin.codegen.jdk.JvmTarget${target}OnJvm${jvm}")
if (jdk == "JDK_9") {
jvmArgs = listOf("--add-opens", "java.desktop/javax.swing=ALL-UNNAMED", "--add-opens", "java.base/java.io=ALL-UNNAMED")
}
body()
doFirst {
val jdkPath = project.findProperty(jdk) ?: error("$jdk is not optional to run this test")