mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
AT-3038: do not run xvfb for headless tests
GitOrigin-RevId: 1c41d378e178272e2a42f45b361f84bea57a5a37
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2c62d815a1
commit
4c5545ec77
+3
-3
@@ -28,9 +28,9 @@ class LinuxIdeDistribution : IdeDistribution() {
|
||||
XVFB_TOOL_NAME
|
||||
}
|
||||
|
||||
fun linuxCommandLine(xvfbRunLog: Path, commandEnv: Map<String, String> = emptyMap()): List<String> {
|
||||
fun linuxCommandLine(xvfbRunLog: Path, vmOptions: VMOptions): List<String> {
|
||||
return when {
|
||||
System.getenv("DISPLAY") != null || commandEnv["DISPLAY"] != null -> listOf()
|
||||
System.getenv("DISPLAY") != null || vmOptions.environmentVariables["DISPLAY"] != null || vmOptions.hasHeadlessMode() -> listOf()
|
||||
else ->
|
||||
//hint https://gist.github.com/tullmann/2d8d38444c5e81a41b6d
|
||||
listOf(
|
||||
@@ -80,7 +80,7 @@ class LinuxIdeDistribution : IdeDistribution() {
|
||||
return object : InstalledBackedIDEStartConfig(patchedVMOptionsFile, vmOptions) {
|
||||
override val errorDiagnosticFiles = listOf(xvfbRunLog)
|
||||
override val workDir = appHome
|
||||
override val commandLine: List<String> = linuxCommandLine(xvfbRunLog, vmOptions.environmentVariables) + executablePath.toAbsolutePath().toString()
|
||||
override val commandLine: List<String> = linuxCommandLine(xvfbRunLog, vmOptions) + executablePath.toAbsolutePath().toString()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -135,7 +135,7 @@ class IdeFromCodeInstaller(private val useInstallationCache: Boolean = true) : I
|
||||
val xvfbRunLog = LinuxIdeDistribution.Companion.createXvfbRunLog(logsDir)
|
||||
|
||||
override val commandLine: List<String> = when {
|
||||
SystemInfoRt.isLinux -> LinuxIdeDistribution.Companion.linuxCommandLine(xvfbRunLog, commandEnv = finalVMOptions.environmentVariables) + commandArgs
|
||||
SystemInfoRt.isLinux -> LinuxIdeDistribution.Companion.linuxCommandLine(xvfbRunLog, vmOptions = finalVMOptions) + commandArgs
|
||||
else -> commandArgs
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user