Skip to content

Commit c22971e

Browse files
Domoniondenis-fokin
authored andcommitted
Linux engine process fix (#1126)
[utbot-rd] fixing ubuntu process start and log creating (cherry picked from commit c30841d)
1 parent 1002b70 commit c22971e

File tree

1 file changed

+5
-7
lines changed
  • utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/process

1 file changed

+5
-7
lines changed

utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/process/EngineProcess.kt

+5-7
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ import kotlinx.coroutines.runBlocking
1111
import kotlinx.coroutines.sync.Mutex
1212
import kotlinx.coroutines.sync.withLock
1313
import mu.KotlinLogging
14-
import org.utbot.common.AbstractSettings
15-
import org.utbot.common.getPid
16-
import org.utbot.common.osSpecificJavaExecutable
17-
import org.utbot.common.utBotTempDirectory
14+
import org.utbot.common.*
1815
import org.utbot.framework.UtSettings
1916
import org.utbot.framework.codegen.*
2017
import org.utbot.framework.codegen.model.UtilClassKind
@@ -81,8 +78,9 @@ class EngineProcess(parent: Lifetime, val project: Project) {
8178
)
8279
}.toPath()
8380
realPath = configPath
81+
logger.info("log configuration path - ${realPath!!.pathString}")
8482
}
85-
return realPath!!.pathString
83+
return realPath.pathString
8684
}
8785

8886
private fun debugArgument(): String {
@@ -104,14 +102,14 @@ class EngineProcess(parent: Lifetime, val project: Project) {
104102
val java =
105103
JdkInfoService.jdkInfoProvider.info.path.resolve("bin${File.separatorChar}${osSpecificJavaExecutable()}").toString()
106104
val cp = (this.javaClass.classLoader as PluginClassLoader).classPath.baseUrls.joinToString(
107-
separator = ";",
105+
separator = if (isWindows) ";" else ":",
108106
prefix = "\"",
109107
postfix = "\""
110108
)
111109
val classname = "org.utbot.framework.process.EngineMainKt"
112110
val javaVersionSpecificArguments = OpenModulesContainer.javaVersionSpecificArguments
113111
val directory = WorkingDirService.provide().toFile()
114-
val log4j2ConfigFile = "\"-Dlog4j2.configurationFile=${getOrCreateLogConfig()}\""
112+
val log4j2ConfigFile = "-Dlog4j2.configurationFile=${getOrCreateLogConfig()}"
115113
val debugArg = debugArgument()
116114
logger.info { "java - $java\nclasspath - $cp\nport - $port" }
117115
val cmd = mutableListOf<String>(java, "-ea")

0 commit comments

Comments
 (0)