diff --git a/platform/testGuiFramework/src/com/intellij/testGuiFramework/impl/GuiTestCase.kt b/platform/testGuiFramework/src/com/intellij/testGuiFramework/impl/GuiTestCase.kt index 984fe1a69dd1..87295a51e92c 100644 --- a/platform/testGuiFramework/src/com/intellij/testGuiFramework/impl/GuiTestCase.kt +++ b/platform/testGuiFramework/src/com/intellij/testGuiFramework/impl/GuiTestCase.kt @@ -65,14 +65,16 @@ import javax.swing.text.JTextComponent open class GuiTestCase { companion object { + private val PROJECTS_ROOT_FOLDER: File = File(FileUtil.getTempDirectory()) + @ClassRule @JvmField - val projectsFolder: TemporaryFolder = TemporaryFolder() + val projectsFolder: TemporaryFolder = TemporaryFolder(PROJECTS_ROOT_FOLDER) } @Rule @JvmField - val guiTestRule = GuiTestRule(projectsFolder.apply{ create() }.root.canonicalFile) + val guiTestRule = GuiTestRule(PROJECTS_ROOT_FOLDER) val settingsTitle: String = if (isMac()) "Preferences" else "Settings" // val defaultSettingsTitle: String = if (isMac()) "Default Preferences" else "Default Settings" diff --git a/platform/testGuiFramework/src/com/intellij/testGuiFramework/launcher/GuiTestLocalLauncher.kt b/platform/testGuiFramework/src/com/intellij/testGuiFramework/launcher/GuiTestLocalLauncher.kt index 84a3b8e1d172..768791ca7c3b 100644 --- a/platform/testGuiFramework/src/com/intellij/testGuiFramework/launcher/GuiTestLocalLauncher.kt +++ b/platform/testGuiFramework/src/com/intellij/testGuiFramework/launcher/GuiTestLocalLauncher.kt @@ -287,6 +287,7 @@ object GuiTestLocalLauncher { .plus("-Didea.config.path=${GuiTestOptions.configPath}") .plus("-Didea.system.path=${GuiTestOptions.systemPath}") .plus("-Dfile.encoding=${GuiTestOptions.encoding}") + .plusIf(System.getProperty("java.io.tmpdir") != null, "-Djava.io.tmpdir=${System.getProperty("java.io.tmpdir")}") .plusIf(!ide.ideType.platformPrefix.isNullOrEmpty(), "-Didea.platform.prefix=${ide.ideType.platformPrefix}") .plus(ide.ideType.ideSpecificOptions) .plus(customVmOptions)