[compiletest]: use common infrastructure to detect the host OS

This commit is contained in:
Aleksey Kladov
2017-10-20 12:11:09 +03:00
committed by ilmat192
parent 2b6c284ff8
commit 635288ec85
2 changed files with 4 additions and 3 deletions
+1
View File
@@ -4,6 +4,7 @@ apply plugin: 'kotlin'
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile project(path: ':backend.native', configuration: 'cli_bc')
compile project(':shared')
testCompile 'junit:junit:4.12'
}
@@ -1,14 +1,14 @@
package org.jetbrains.kotlin.compiletest
import org.jetbrains.kotlin.konan.target.Family
import org.jetbrains.kotlin.konan.target.TargetManager
import java.nio.file.Path
import java.nio.file.Paths
object DistProperties {
private val isWindows: Boolean = requireProp("os.name").startsWith("Windows")
private val dist: Path = Paths.get(requireProp("konan.home"))
private val konancDriver = if (isWindows) "konanc.bat" else "konanc"
private val konancDriver = if (TargetManager.host.family == Family.WINDOWS) "konanc.bat" else "konanc"
val konanc: Path = dist.resolve("bin/$konancDriver")
val lldb: Path = Paths.get("lldb")