From 3dcd1ea35534bad043e99b84235f28b9a844503e Mon Sep 17 00:00:00 2001 From: Vladislav Shishov Date: Wed, 13 Mar 2019 12:00:50 +0300 Subject: [PATCH] [gui-test] redirect idea output to file --- .../com/intellij/testGuiFramework/framework/GuiTestPaths.kt | 4 ++++ .../testGuiFramework/launcher/GuiTestLocalLauncher.kt | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/platform/testGuiFramework/src/com/intellij/testGuiFramework/framework/GuiTestPaths.kt b/platform/testGuiFramework/src/com/intellij/testGuiFramework/framework/GuiTestPaths.kt index 5a75439e2ec9..e1b2ad238788 100644 --- a/platform/testGuiFramework/src/com/intellij/testGuiFramework/framework/GuiTestPaths.kt +++ b/platform/testGuiFramework/src/com/intellij/testGuiFramework/framework/GuiTestPaths.kt @@ -28,6 +28,10 @@ object GuiTestPaths { return@lazy dirPath } + val ideaOutputFile: File by lazy { + File(guiTestRootDirPath, "idea-output.log") + } + private val guiTestRootDirPath: File by lazy { if (!GuiTestOptions.guiTestRootDirPath.isNullOrEmpty()) { val rootDirPath = File(GuiTestOptions.guiTestRootDirPath) diff --git a/platform/testGuiFramework/src/com/intellij/testGuiFramework/launcher/GuiTestLocalLauncher.kt b/platform/testGuiFramework/src/com/intellij/testGuiFramework/launcher/GuiTestLocalLauncher.kt index 79598758d7a9..86992d482844 100644 --- a/platform/testGuiFramework/src/com/intellij/testGuiFramework/launcher/GuiTestLocalLauncher.kt +++ b/platform/testGuiFramework/src/com/intellij/testGuiFramework/launcher/GuiTestLocalLauncher.kt @@ -18,6 +18,7 @@ package com.intellij.testGuiFramework.launcher import com.intellij.openapi.application.PathManager import com.intellij.openapi.util.io.FileUtil import com.intellij.openapi.vfs.VfsUtilCore +import com.intellij.testGuiFramework.framework.GuiTestPaths import com.intellij.testGuiFramework.impl.GuiTestStarter import com.intellij.testGuiFramework.launcher.classpath.ClassPathBuilder.Companion.toClasspathJarFile import com.intellij.testGuiFramework.launcher.classpath.PathUtils @@ -82,7 +83,7 @@ object GuiTestLocalLauncher { testClassNames: List = emptyList(), additionalJvmOptions: List> = emptyList()) { val args = createArgs(ide = ide, port = port, testClassNames = testClassNames, additionalJvmOptions = additionalJvmOptions) - return startIde(ide = ide, ideaStartTest = ProcessBuilder().inheritIO().command(args)) + return startIde(ide = ide, ideaStartTest = ProcessBuilder().redirectOutput(GuiTestPaths.ideaOutputFile).command(args)) } fun runIdeWithDTraceLocally(ide: Ide = Ide(CommunityIde(), 0, 0),