build/tests: check exit status instead of output of external tests

This commit is contained in:
Svyatoslav Scherbina
2017-03-10 13:18:48 +07:00
committed by SvyatoslavScherbina
parent 13bbd7af81
commit 9e58f884d3
@@ -242,7 +242,6 @@ class RunExternalTestGroup extends RunKonanTest {
Statistics statistics = new Statistics() Statistics statistics = new Statistics()
RunExternalTestGroup() { RunExternalTestGroup() {
goldValue = "OK"
} }
static enum TestStatus { static enum TestStatus {
@@ -324,11 +323,11 @@ class RunExternalTestGroup extends RunKonanTest {
import kotlin.test.TestFailedException import kotlin.test.TestFailedException
fun main(args : Array<String>) { fun main(args : Array<String>) {
try { @Suppress("USELESS_ELVIS")
@Suppress("USELESS_ELVIS") val result = ${pkg}box()?:"null"
print(${pkg}box()?:"null") println(result)
} catch (e:TestFailedException) { if (result != "OK") {
print("FAIL") throw TestFailedException(result)
} }
} }
""") """)