Minor: print subprocess output immediately in tests
This commit is contained in:
+6
-3
@@ -28,11 +28,14 @@ fun runProcess(cmd: List<String>, workingDir: File): ProcessRunResult {
|
||||
|
||||
val process = builder.start()
|
||||
// important to read inputStream, otherwise the process may hang on some systems
|
||||
val output = process.inputStream!!.bufferedReader().readText()
|
||||
System.out.println(output)
|
||||
val sb = StringBuilder()
|
||||
process.inputStream!!.bufferedReader().forEachLine {
|
||||
System.out.println(it)
|
||||
sb.appendln(it)
|
||||
}
|
||||
val exitCode = process.waitFor()
|
||||
|
||||
return ProcessRunResult(cmd, workingDir, exitCode, output)
|
||||
return ProcessRunResult(cmd, workingDir, exitCode, sb.toString())
|
||||
}
|
||||
|
||||
fun createGradleCommand(tailParameters: List<String>): List<String> {
|
||||
|
||||
Reference in New Issue
Block a user