[Gradle, JS] All karma output to debug

#KT-38109 fixed
This commit is contained in:
Ilya Goncharov
2020-04-09 21:02:45 +03:00
parent e1793c59be
commit 70f6ad7691
2 changed files with 8 additions and 18 deletions
@@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors. * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
@@ -23,18 +23,11 @@ internal open class JSServiceMessagesTestExecutionSpec(
checkExitCode, checkExitCode,
clientSettings clientSettings
) { ) {
protected val suppressedOutput = StringBuilder()
override fun showSuppressedOutput() {
println(suppressedOutput)
}
override fun createClient(testResultProcessor: TestResultProcessor, log: Logger): TCServiceMessagesClient { override fun createClient(testResultProcessor: TestResultProcessor, log: Logger): TCServiceMessagesClient {
return JSServiceMessagesClient( return JSServiceMessagesClient(
results = testResultProcessor, results = testResultProcessor,
settings = clientSettings, settings = clientSettings,
log = log, log = log
suppressedOutput = suppressedOutput
) )
} }
} }
@@ -42,10 +35,11 @@ internal open class JSServiceMessagesTestExecutionSpec(
internal open class JSServiceMessagesClient( internal open class JSServiceMessagesClient(
results: TestResultProcessor, results: TestResultProcessor,
settings: TCServiceMessagesClientSettings, settings: TCServiceMessagesClientSettings,
log: Logger, log: Logger
private val suppressedOutput: StringBuilder
) : TCServiceMessagesClient(results, settings, log) { ) : TCServiceMessagesClient(results, settings, log) {
override fun printNonTestOutput(text: String) { override fun printNonTestOutput(text: String) {
suppressedOutput.appendln(text) if (log.isDebugEnabled) {
log.debug(text)
}
} }
} }
@@ -411,8 +411,7 @@ class KotlinKarma(override val compilation: KotlinJsCompilation) :
object : JSServiceMessagesClient( object : JSServiceMessagesClient(
testResultProcessor, testResultProcessor,
clientSettings, clientSettings,
log, log
suppressedOutput
) { ) {
val baseTestNameSuffix get() = settings.testNameSuffix val baseTestNameSuffix get() = settings.testNameSuffix
override var testNameSuffix: String? = baseTestNameSuffix override var testNameSuffix: String? = baseTestNameSuffix
@@ -424,10 +423,7 @@ class KotlinKarma(override val compilation: KotlinJsCompilation) :
progressLogger.progress(value) progressLogger.progress(value)
parseConsole(value) parseConsole(value)
super.printNonTestOutput(text)
if (log.isDebugEnabled) {
super.printNonTestOutput(text)
}
} }
private fun parseConsole(text: String) { private fun parseConsole(text: String) {