mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-13 15:52:01 +07:00
IJI-2230 redirecting of messages from a file to the build log should be enabled before resetting the stdout stream
otherwise, the file content is never processed GitOrigin-RevId: 3368e67e3dd2016328d9e86d58a787da1ffc7561
This commit is contained in:
committed by
intellij-monorepo-bot
parent
66461a7f91
commit
74d8c0be49
@@ -151,7 +151,7 @@ class TeamCityBuildMessageLogger : BuildMessageLogger() {
|
||||
print(ServiceMessageTypes.BUILD_STOP, "comment" to message.text, "readdToQueue" to "false")
|
||||
}
|
||||
IMPORT_DATA -> {
|
||||
print("importData", "type" to "streamToBuildLog", "filePath" to message.text, "wrapFileContentInBlock" to "false", )
|
||||
print("importData", "type" to "streamToBuildLog", "filePath" to message.text, "wrapFileContentInBlock" to "false")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,15 +84,16 @@ internal class TestingTasksImpl(context: CompilationContext, private val options
|
||||
rootExcludeCondition: ((Path) -> Boolean)?) {
|
||||
if (TeamCityHelper.isUnderTeamCity) {
|
||||
val outputFile = Files.createTempFile("testBuildOutput", ".txt").apply { Files.delete(this) }.toFile()
|
||||
context.messages.startWritingFileToBuildLog(outputFile.absolutePath)
|
||||
val outputStream = System.out
|
||||
PrintStream(FileOutputStream(outputFile)).use {
|
||||
System.setOut(it)
|
||||
context.messages.startWritingFileToBuildLog(outputFile.absolutePath)
|
||||
try {
|
||||
runTestsImpl(additionalJvmOptions, additionalSystemProperties, defaultMainModule, rootExcludeCondition)
|
||||
}
|
||||
finally {
|
||||
System.setOut(outputStream)
|
||||
context.messages.artifactBuilt(outputFile.absolutePath)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user