[gui-test] fix tmp dirs location

This commit is contained in:
Vladislav Shishov
2018-11-20 16:10:29 +03:00
parent 4b6b6fdf3d
commit ece63258d7
2 changed files with 5 additions and 2 deletions
@@ -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"
@@ -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)