LV20: refactor K2 scripting tests - rename tasks

This commit is contained in:
Ilya Chernikov
2023-08-07 12:02:03 +02:00
committed by Space Team
parent 2c4cca5785
commit e3dae559d0
6 changed files with 43 additions and 21 deletions
+9 -9
View File
@@ -708,24 +708,24 @@ tasks {
dependsOn(":kotlin-scripting-dependencies:test")
dependsOn(":kotlin-scripting-dependencies-maven:test")
dependsOn(":kotlin-scripting-dependencies-maven-all:test")
dependsOn(":kotlin-scripting-jsr223-test:test")
// see comments on the task in kotlin-scripting-jvm-host-test
// dependsOn(":kotlin-scripting-jvm-host-test:embeddableTest")
dependsOn(":kotlin-scripting-jsr223-test:embeddableTest")
dependsOn(":kotlin-scripting-ide-services-test:test")
dependsOn(":kotlin-scripting-ide-services-test:embeddableTest")
dependsOn(":kotlin-main-kts-test:test")
}
register("scriptingK2Test") {
dependsOn(":kotlin-scripting-compiler:testWithK2")
dependsOn(":kotlin-scripting-jvm-host-test:testWithK2")
dependsOn(":kotlin-main-kts-test:testWithK2")
register("scriptingK1JvmTest") {
dependsOn(":kotlin-scripting-compiler:testWithK1")
dependsOn(":kotlin-scripting-jvm-host-test:testWithK1")
dependsOn(":kotlin-main-kts-test:testWithK1")
dependsOn(":kotlin-scripting-jsr223-test:test")
dependsOn(":kotlin-scripting-jsr223-test:embeddableTest")
dependsOn(":kotlin-scripting-ide-services-test:test")
dependsOn(":kotlin-scripting-ide-services-test:embeddableTest")
}
register("scriptingTest") {
dependsOn("scriptingJvmTest")
dependsOn("scriptingK2Test")
dependsOn("scriptingK1JvmTest")
}
register("compilerTest") {
@@ -53,6 +53,7 @@ projectTest(parallel = true) {
doFirst {
systemProperty("testJsr223RuntimeClasspath", testRuntimeProvider.get())
systemProperty("testCompilationClasspath", testCompilationClasspathProvider.get())
systemProperty("kotlin.script.base.compiler.arguments", "-language-version 1.9")
}
}
@@ -60,4 +61,11 @@ projectTest(taskName = "embeddableTest", parallel = true) {
workingDir = rootDir
dependsOn(embeddableTestRuntime)
classpath = embeddableTestRuntime
val testRuntimeProvider = project.provider { embeddableTestRuntime.asPath }
val testCompilationClasspathProvider = project.provider { testCompilationClasspath.asPath }
doFirst {
systemProperty("testJsr223RuntimeClasspath", testRuntimeProvider.get())
systemProperty("testCompilationClasspath", testCompilationClasspathProvider.get())
systemProperty("kotlin.script.base.compiler.arguments", "-language-version 1.9")
}
}
@@ -53,8 +53,10 @@ projectTest(parallel = true) {
// classpath = embeddableTestRuntime
//}
projectTest(taskName = "testWithK2", parallel = true) {
projectTest(taskName = "testWithK1", parallel = true) {
dependsOn(":dist")
workingDir = rootDir
systemProperty("kotlin.script.base.compiler.arguments", "-language-version 2.0")
doFirst {
systemProperty("kotlin.script.base.compiler.arguments", "-language-version 1.9")
}
}
@@ -25,18 +25,20 @@ sourceSets {
projectTest(parallel = true) {
dependsOn(":dist", ":kotlinx-serialization-compiler-plugin.embeddable:embeddable")
workingDir = rootDir
val localKotlinxSerializationPluginClasspath: FileCollection = kotlinxSerializationGradlePluginClasspath
doFirst {
systemProperty("kotlin.script.test.kotlinx.serialization.plugin.classpath", localKotlinxSerializationPluginClasspath.asPath)
}
workingDir = rootDir
}
projectTest(taskName = "testWithK2", parallel = true) {
projectTest(taskName = "testWithK1", parallel = true) {
dependsOn(":dist", ":kotlinx-serialization-compiler-plugin.embeddable:embeddable")
workingDir = rootDir
val localKotlinxSerializationPluginClasspath: FileCollection = kotlinxSerializationGradlePluginClasspath
systemProperty("kotlin.script.test.kotlinx.serialization.plugin.classpath", localKotlinxSerializationPluginClasspath.asPath)
systemProperty("kotlin.script.base.compiler.arguments", "-language-version 2.0")
systemProperty("kotlin.script.test.base.compiler.arguments", "-language-version 2.0")
doFirst {
systemProperty("kotlin.script.test.kotlinx.serialization.plugin.classpath", localKotlinxSerializationPluginClasspath.asPath)
systemProperty("kotlin.script.base.compiler.arguments", "-language-version 1.9")
systemProperty("kotlin.script.test.base.compiler.arguments", "-language-version 1.9")
}
}
@@ -63,14 +63,18 @@ testsJar()
projectTest(parallel = true) {
dependsOn(":dist")
workingDir = rootDir
systemProperty("kotlin.test.script.classpath", testSourceSet.output.classesDirs.joinToString(File.pathSeparator))
doFirst {
systemProperty("kotlin.test.script.classpath", testSourceSet.output.classesDirs.joinToString(File.pathSeparator))
}
}
projectTest(taskName = "testWithK2", parallel = true) {
projectTest(taskName = "testWithK1", parallel = true) {
dependsOn(":dist")
workingDir = rootDir
systemProperty("kotlin.test.script.classpath", testSourceSet.output.classesDirs.joinToString(File.pathSeparator))
systemProperty("kotlin.script.test.base.compiler.arguments", "-language-version 2.0")
systemProperty("kotlin.script.base.compiler.arguments", "-language-version 2.0")
doFirst {
systemProperty("kotlin.test.script.classpath", testSourceSet.output.classesDirs.joinToString(File.pathSeparator))
systemProperty("kotlin.script.test.base.compiler.arguments", "-language-version 1.9")
systemProperty("kotlin.script.base.compiler.arguments", "-language-version 1.9")
}
}
@@ -59,6 +59,9 @@ tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
projectTest(parallel = true) {
dependsOn(":kotlin-compiler:distKotlinc")
workingDir = rootDir
doFirst {
systemProperty("kotlin.script.base.compiler.arguments", "-language-version 1.9")
}
}
// This doesn;t work now due to conflicts between embeddable compiler contents and intellij sdk modules
@@ -69,4 +72,7 @@ projectTest(taskName = "embeddableTest", parallel = true) {
classpath = embeddableTestRuntime
exclude("**/JvmReplIdeTest.class")
doFirst {
systemProperty("kotlin.script.base.compiler.arguments", "-language-version 1.9")
}
}