Rename debugger tests and add to execution

This commit is contained in:
Pavel Punegov
2020-06-08 18:08:34 +03:00
committed by Pavel Punegov
parent 23f4866316
commit da312cd16e
6 changed files with 27 additions and 26 deletions
@@ -1,19 +0,0 @@
apply plugin: 'java'
apply plugin: 'kotlin'
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
compile project(path: ':backend.native', configuration: 'cli_bc')
compile "org.jetbrains.kotlin:kotlin-native-shared:$konanVersion"
compile 'junit:junit:4.12'
}
test {
testLogging { exceptionFormat = 'full' }
def dist = project.rootProject.file("dist").canonicalPath
systemProperties = [
'org.jetbrains.kotlin.native.home': dist
]
}
test.dependsOn ':dist'
+22
View File
@@ -240,6 +240,8 @@ run {
dependsOn(tasksOf(KonanTest))
// Add framework tests
dependsOn(tasksOf(FrameworkTest))
// Add regular gradle test tasks
dependsOn(tasksOf(Test))
}
task sanity {
@@ -257,6 +259,9 @@ task sanity {
dependsOn(tasksOf(FrameworkTest) { task ->
task.getDependsOn().every { !platformLibsTasks.contains(it) }
})
// Add regular gradle test tasks
dependsOn(tasksOf(Test))
}
// Collect reports in one json.
@@ -4440,6 +4445,11 @@ sourceSets {
srcDir 'extensions/nop/src/main/kotlin'
}
}
test {
kotlin {
srcDir 'debugger/src/test/kotlin'
}
}
}
Task pluginTest(String name, String pluginName, Closure configureClosure) {
@@ -4476,6 +4486,18 @@ pluginTest("runtime_basic_init", "nopPlugin") {
dependencies {
nopPluginCompile kotlinCompilerModule
compile kotlinCompilerModule
compile project(path: ':backend.native', configuration: 'cli_bc')
compile 'junit:junit:4.12'
}
// MacOS only: KT-30366
if (target.family == Family.OSX) {
project.tasks.register("debugger_test", Test.class) {
testLogging { exceptionFormat = 'full' }
UtilsKt.dependsOnDist(it)
systemProperties = ['kotlin.native.home': dist]
}
}
// Configure build for iOS device targets.
@@ -3,16 +3,15 @@
* that can be found in the LICENSE file.
*/
package org.jetbrains.kotlin.compiletest
package org.jetbrains.kotlin.native.test.debugger
import org.jetbrains.kotlin.konan.target.Family
import org.jetbrains.kotlin.konan.target.HostManager
import java.nio.file.Path
import java.nio.file.Paths
object DistProperties {
private val dist: Path = Paths.get(requireProp("org.jetbrains.kotlin.native.home"))
private val dist: Path = Paths.get(requireProp("kotlin.native.home"))
private val konancDriver = if (HostManager.host.family == Family.MINGW) "konanc.bat" else "konanc"
val konanc: Path = dist.resolve("bin/$konancDriver")
val lldb: Path = Paths.get("lldb")
@@ -3,7 +3,7 @@
* that can be found in the LICENSE file.
*/
package org.jetbrains.kotlin.compiletest
package org.jetbrains.kotlin.native.test.debugger
import org.jetbrains.kotlin.cli.bc.K2Native
import java.nio.file.Files
@@ -24,7 +24,6 @@ class ToolDriver(
K2Native.main(allArgs)
} else {
subprocess(konancDriver, *allArgs).thrownIfFailed()
}
check(Files.exists(output)) {
"Compiler has not produced an output at $output"
@@ -3,7 +3,7 @@
* that can be found in the LICENSE file.
*/
import org.jetbrains.kotlin.compiletest.lldbTest
import org.jetbrains.kotlin.native.test.debugger.lldbTest
import org.junit.Test
class LldbTests {
@@ -3,7 +3,7 @@
* that can be found in the LICENSE file.
*/
package org.jetbrains.kotlin.compiletest
package org.jetbrains.kotlin.native.test.debugger
import org.intellij.lang.annotations.Language
import org.junit.Assert.fail