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:
+4
-2
@@ -532,8 +532,10 @@ tasks {
|
||||
create("scriptingTest") {
|
||||
dependsOn("dist")
|
||||
dependsOn(":kotlin-script-util:test")
|
||||
dependsOn(":kotlin-scripting-jvm-host:test")
|
||||
dependsOn(":kotlin-scripting-jsr223:test")
|
||||
dependsOn(":kotlin-scripting-jvm-host-test:test")
|
||||
dependsOn(":kotlin-scripting-jsr223-test:test")
|
||||
dependsOn(":kotlin-scripting-jvm-host-test:embeddableTest")
|
||||
dependsOn(":kotlin-scripting-jsr223-test:embeddableTest")
|
||||
dependsOn(":kotlin-main-kts-test:test")
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -187,6 +187,7 @@ include ":kotlin-build-common",
|
||||
":kotlin-scripting-compiler-impl",
|
||||
":kotlin-scripting-compiler-impl-embeddable",
|
||||
":kotlin-scripting-jsr223",
|
||||
":kotlin-scripting-jsr223-test",
|
||||
":kotlin-scripting-jsr223-embeddable",
|
||||
":kotlin-scripting-idea",
|
||||
":kotlin-main-kts",
|
||||
@@ -362,6 +363,7 @@ project(':kotlin-scripting-jvm-host').projectDir = "$rootDir/libraries/scripting
|
||||
project(':kotlin-scripting-jvm-host-test').projectDir = "$rootDir/libraries/scripting/jvm-host-test" as File
|
||||
project(':kotlin-scripting-jvm-host-embeddable').projectDir = "$rootDir/libraries/scripting/jvm-host-embeddable" as File
|
||||
project(':kotlin-scripting-jsr223').projectDir = "$rootDir/libraries/scripting/jsr223" as File
|
||||
project(':kotlin-scripting-jsr223-test').projectDir = "$rootDir/libraries/scripting/jsr223-test" as File
|
||||
project(':kotlin-scripting-jsr223-embeddable').projectDir = "$rootDir/libraries/scripting/jsr223-embeddable" as File
|
||||
project(':kotlin-scripting-intellij').projectDir = "$rootDir/libraries/scripting/intellij" as File
|
||||
project(':kotlin-scripting-compiler').projectDir = "$rootDir/plugins/scripting/scripting-compiler" as File
|
||||
|
||||
Reference in New Issue
Block a user