Implement test run on embeddable jars for jsr223 and scripting host tests...

also:
- add missing tests to the global scriptingTests task
- extract jsr223 tests into separate project
- fix dependency in jsr223 embeddable jar
This commit is contained in:
Ilya Chernikov
2019-05-23 12:58:48 +02:00
parent a3d1fe312e
commit b97813f2b0
7 changed files with 62 additions and 10 deletions
@@ -14,6 +14,7 @@ dependencies {
runtime(kotlinStdlib())
runtime(project(":kotlin-scripting-common"))
runtime(project(":kotlin-scripting-jvm"))
runtime(project(":kotlin-scripting-jvm-host-embeddable"))
runtime(project(":kotlin-compiler-embeddable"))
runtime(project(":kotlin-scripting-compiler-embeddable"))
}
@@ -0,0 +1,32 @@
plugins {
kotlin("jvm")
}
jvmTarget = "1.6"
val embeddableTestRuntime by configurations.creating
dependencies {
testCompile(commonDep("junit"))
testCompileOnly(project(":kotlin-scripting-jvm-host"))
testCompileOnly(project(":compiler:cli"))
testCompileOnly(project(":core:util.runtime"))
testRuntime(project(":kotlin-scripting-jsr223"))
embeddableTestRuntime(commonDep("junit"))
embeddableTestRuntime(project(":kotlin-scripting-jsr223-embeddable"))
embeddableTestRuntime(testSourceSet.output)
}
sourceSets {
"main" {}
"test" { projectDefault() }
}
projectTest(parallel = true)
projectTest(taskName = "embeddableTest", parallel = true) {
workingDir = rootDir
dependsOn(embeddableTestRuntime)
classpath = embeddableTestRuntime
}
+1 -4
View File
@@ -17,14 +17,11 @@ dependencies {
compileOnly(intellijCoreDep())
runtime(project(":kotlin-compiler"))
runtime(project(":kotlin-reflect"))
testCompile(commonDep("junit"))
testCompileOnly(project(":compiler:cli"))
testCompileOnly(project(":core:util.runtime"))
}
sourceSets {
"main" { projectDefault() }
"test" { projectDefault() }
"test" {}
}
publish()
@@ -5,13 +5,25 @@ plugins {
jvmTarget = "1.6"
val allTestsRuntime by configurations.creating
val testCompile by configurations
testCompile.extendsFrom(allTestsRuntime)
val embeddableTestRuntime by configurations.creating {
extendsFrom(allTestsRuntime)
}
dependencies {
testCompile(intellijCoreDep())
testCompile(intellijDep()) { includeJars("openapi", "idea", "log4j") }
allTestsRuntime(commonDep("junit"))
allTestsRuntime(intellijCoreDep()) { includeJars("intellij-core") }
allTestsRuntime(intellijDep()) { includeJars("openapi", "idea", "idea_rt", "log4j") }
testCompile(project(":kotlin-scripting-jvm-host"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(commonDep("junit"))
testCompile(project(":compiler:daemon-common")) // TODO: fix import (workaround for jps build)
testCompile(project(":daemon-common")) // TODO: fix import (workaround for jps build)
embeddableTestRuntime(project(":kotlin-scripting-jvm-host-embeddable"))
embeddableTestRuntime(project(":kotlin-test:kotlin-test-jvm"))
embeddableTestRuntime(project(":kotlin-test:kotlin-test-junit"))
embeddableTestRuntime(projectTests(":compiler:tests-common")) { isTransitive = false }
embeddableTestRuntime(testSourceSet.output)
}
sourceSets {
@@ -22,3 +34,9 @@ sourceSets {
projectTest(parallel = true) {
workingDir = rootDir
}
projectTest(taskName = "embeddableTest", parallel = true) {
workingDir = rootDir
dependsOn(embeddableTestRuntime)
classpath = embeddableTestRuntime
}