Stop polluting output for successful Gradle tests
This commit is contained in:
committed by
TeamCityServer
parent
decfaa3ba5
commit
48f2db51d2
+5
-4
@@ -340,20 +340,21 @@ abstract class BaseGradleIT {
|
|||||||
|
|
||||||
val cmd = createBuildCommand(wrapperDir, params, options)
|
val cmd = createBuildCommand(wrapperDir, params, options)
|
||||||
|
|
||||||
println("<=== Test build: ${this.projectName} $cmd ===>")
|
|
||||||
|
|
||||||
if (!projectDir.exists()) {
|
if (!projectDir.exists()) {
|
||||||
setupWorkingDir()
|
setupWorkingDir()
|
||||||
}
|
}
|
||||||
|
|
||||||
maybeUpdateSettingsScript(wrapperVersion, gradleSettingsScript())
|
maybeUpdateSettingsScript(wrapperVersion, gradleSettingsScript())
|
||||||
|
|
||||||
val result = runProcess(cmd, projectDir, env, options)
|
var result: ProcessRunResult? = null
|
||||||
try {
|
try {
|
||||||
|
result = runProcess(cmd, projectDir, env, options)
|
||||||
CompiledProject(this, result.output, result.exitCode).check()
|
CompiledProject(this, result.output, result.exitCode).check()
|
||||||
} catch (t: Throwable) {
|
} catch (t: Throwable) {
|
||||||
|
println("<=== Test build: ${this.projectName} $cmd ===>")
|
||||||
|
|
||||||
// to prevent duplication of output
|
// to prevent duplication of output
|
||||||
if (!options.forceOutputToStdout) {
|
if (!options.forceOutputToStdout && result != null) {
|
||||||
println(result.output)
|
println(result.output)
|
||||||
}
|
}
|
||||||
throw t
|
throw t
|
||||||
|
|||||||
Reference in New Issue
Block a user