Generate proper sources jar for compiler-embeddable, fixing problem with locating embeddable compiler jar in tests, revealed by the change

KT-8487
This commit is contained in:
Ilya Chernikov
2016-01-07 12:50:54 +01:00
committed by Alexey Tsvetkov
parent 66f1f87757
commit d4a86b7f6d
2 changed files with 25 additions and 8 deletions
@@ -36,8 +36,12 @@ public class CompilerSmokeTest {
private val javaExecutable = File( File(System.getProperty("java.home"), "bin"), "java")
private val embeddableJar = File(".").listFiles { it -> it.name.startsWith("kotlin-compiler-embeddable", ignoreCase = true) && it.name.endsWith(".jar", ignoreCase = true) }?.firstOrNull()
?: throw FileNotFoundException("cannot find kotlin-compiler-embeddable*.jar in the directory " + File(".").absolutePath)
private val embeddableJar: File by lazy {
val f = File(System.getProperty("compilerJar") ?: "kotlin-compiler-embeddable.jar")
if (!f.exists())
throw FileNotFoundException("cannot find kotlin-compiler-embeddable.jar ($f)")
f
}
@Test
fun testSmoke() {