Make stdlib tests be always verbose

This commit is contained in:
Pavel Punegov
2019-07-08 11:50:46 +03:00
committed by Pavel Punegov
parent ae093ea80d
commit acdf62fa2e
@@ -14,7 +14,6 @@ import org.gradle.api.tasks.Optional
import org.gradle.api.tasks.TaskAction import org.gradle.api.tasks.TaskAction
import org.gradle.language.base.plugins.LifecycleBasePlugin import org.gradle.language.base.plugins.LifecycleBasePlugin
import org.gradle.process.ExecSpec import org.gradle.process.ExecSpec
import org.jetbrains.kotlin.gradle.tasks.KotlinTest
import java.io.File import java.io.File
import java.io.ByteArrayOutputStream import java.io.ByteArrayOutputStream
@@ -151,10 +150,16 @@ open class KonanGTest : KonanTest() {
executor = project.executor::execute, executor = project.executor::execute,
executable = executable, executable = executable,
args = arguments args = arguments
).let { ).run {
parse(it.stdOut) parse(stdOut)
it.print() println("""
check(it.exitCode == 0) { "Test $executable exited with ${it.exitCode}" } |stdout:
|$stdOut
|stderr:
|$stdErr
|exit code: $exitCode
""".trimMargin())
check(exitCode == 0) { "Test $executable exited with $exitCode" }
} }
private fun parse(output: String) = statistics.apply { private fun parse(output: String) = statistics.apply {