From 304a9ebd8e7ae50a4c7faba0d2600dfb14c06b1c Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Thu, 9 Mar 2017 16:47:39 +0700 Subject: [PATCH] build/tests: support declaring tests to be manually executed --- backend.native/tests/build.gradle | 1 + backend.native/tests/interop/basics/echo_server.kt | 3 ++- .../src/main/groovy/org/jetbrains/kotlin/KonanTest.groovy | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/backend.native/tests/build.gradle b/backend.native/tests/build.gradle index 2b4a85f1c14..b5ca8bb37ca 100644 --- a/backend.native/tests/build.gradle +++ b/backend.native/tests/build.gradle @@ -1500,6 +1500,7 @@ task interop_echo_server(type: RunInteropKonanTest) { if (isLinux()) { disabled = true } + run = false source = "interop/basics/echo_server.kt" interop = 'sockets' } diff --git a/backend.native/tests/interop/basics/echo_server.kt b/backend.native/tests/interop/basics/echo_server.kt index 060084f97f8..bec850a660e 100644 --- a/backend.native/tests/interop/basics/echo_server.kt +++ b/backend.native/tests/interop/basics/echo_server.kt @@ -2,7 +2,8 @@ import kotlinx.cinterop.* import sockets.* fun main(args: Array) { - if (args.size == 0) { + if (args.size < 1) { + println("Usage: ./echo_server ") return } diff --git a/buildSrc/src/main/groovy/org/jetbrains/kotlin/KonanTest.groovy b/buildSrc/src/main/groovy/org/jetbrains/kotlin/KonanTest.groovy index 94adc66ce8e..adcd636a3a1 100644 --- a/buildSrc/src/main/groovy/org/jetbrains/kotlin/KonanTest.groovy +++ b/buildSrc/src/main/groovy/org/jetbrains/kotlin/KonanTest.groovy @@ -25,6 +25,7 @@ abstract class KonanTest extends JavaExec { List arguments = null boolean enabled = true + boolean run = true void setDisabled(boolean value) { this.enabled = !value @@ -141,6 +142,11 @@ abstract class KonanTest extends JavaExec { def exe = buildExePath() compileTest(buildCompileList(), exe) + + if (!run) { + println "to be executed manually: $exe" + return + } println "execution :$exe" def out = null