Move scripting jvm host tests to a separate project...
to solve problems with testing with direct dependency on proguarded compiler
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
}
|
||||
|
||||
jvmTarget = "1.6"
|
||||
|
||||
dependencies {
|
||||
testCompile(intellijCoreDep())
|
||||
testCompile(intellijDep()) { includeJars("openapi", "idea", "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)
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" {}
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
projectTest(parallel = true) {
|
||||
workingDir = rootDir
|
||||
}
|
||||
+1
-1
@@ -21,7 +21,7 @@ import kotlin.script.experimental.jvmhost.impl.KJvmReplCompilerImpl
|
||||
class ReplTest : TestCase() {
|
||||
|
||||
companion object {
|
||||
const val TEST_DATA_DIR = "libraries/scripting/jvm-host/testData"
|
||||
const val TEST_DATA_DIR = "libraries/scripting/jvm-host-test/testData"
|
||||
}
|
||||
|
||||
@Test
|
||||
+1
-1
@@ -30,7 +30,7 @@ import kotlin.script.templates.standard.SimpleScriptTemplate
|
||||
class ScriptingHostTest : TestCase() {
|
||||
|
||||
companion object {
|
||||
const val TEST_DATA_DIR = "libraries/scripting/jvm-host/testData"
|
||||
const val TEST_DATA_DIR = "libraries/scripting/jvm-host-test/testData"
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -10,29 +10,22 @@ dependencies {
|
||||
compile(kotlinStdlib())
|
||||
compile(project(":kotlin-scripting-common"))
|
||||
compile(project(":kotlin-scripting-jvm"))
|
||||
compile(project(":kotlin-scripting-compiler"))
|
||||
compile(project(":kotlin-scripting-compiler-impl"))
|
||||
compileOnly(project(":kotlin-scripting-compiler"))
|
||||
compileOnly(project(":compiler:cli"))
|
||||
compileOnly(project(":kotlin-reflect-api"))
|
||||
compileOnly(intellijCoreDep())
|
||||
runtime(projectRuntimeJar(":kotlin-compiler"))
|
||||
runtime(project(":kotlin-scripting-compiler"))
|
||||
runtime(project(":kotlin-reflect"))
|
||||
runtime(commonDep("org.jetbrains.intellij.deps", "trove4j"))
|
||||
testCompile(projectTests(":compiler:tests-common"))
|
||||
testCompile(commonDep("junit"))
|
||||
testCompile(project(":daemon-common")) // TODO: fix import (workaround for jps build)
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
publish()
|
||||
|
||||
standardPublicJars()
|
||||
|
||||
|
||||
projectTest(parallel = true) {
|
||||
workingDir = rootDir
|
||||
}
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import java.io.InputStream
|
||||
import java.net.URL
|
||||
import java.util.*
|
||||
|
||||
internal class CompiledScriptClassLoader(parent: ClassLoader?, private val entries: Map<String, ByteArray>) : ClassLoader(parent) {
|
||||
class CompiledScriptClassLoader(parent: ClassLoader?, private val entries: Map<String, ByteArray>) : ClassLoader(parent) {
|
||||
|
||||
override fun findClass(name: String): Class<*>? {
|
||||
val classPathName = name.replace('.', '/') + ".class"
|
||||
|
||||
Reference in New Issue
Block a user