From 9e58f884d3d298909a975e27c4279d81e0191afc Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Fri, 10 Mar 2017 13:18:48 +0700 Subject: [PATCH] build/tests: check exit status instead of output of external tests --- .../main/groovy/org/jetbrains/kotlin/KonanTest.groovy | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/buildSrc/src/main/groovy/org/jetbrains/kotlin/KonanTest.groovy b/buildSrc/src/main/groovy/org/jetbrains/kotlin/KonanTest.groovy index 6fbacde4e81..e497a48895e 100644 --- a/buildSrc/src/main/groovy/org/jetbrains/kotlin/KonanTest.groovy +++ b/buildSrc/src/main/groovy/org/jetbrains/kotlin/KonanTest.groovy @@ -242,7 +242,6 @@ class RunExternalTestGroup extends RunKonanTest { Statistics statistics = new Statistics() RunExternalTestGroup() { - goldValue = "OK" } static enum TestStatus { @@ -324,11 +323,11 @@ class RunExternalTestGroup extends RunKonanTest { import kotlin.test.TestFailedException fun main(args : Array) { - try { - @Suppress("USELESS_ELVIS") - print(${pkg}box()?:"null") - } catch (e:TestFailedException) { - print("FAIL") + @Suppress("USELESS_ELVIS") + val result = ${pkg}box()?:"null" + println(result) + if (result != "OK") { + throw TestFailedException(result) } } """)