Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux engine process fix #1126

Merged
merged 1 commit into from
Oct 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.sync.Mutex
import kotlinx.coroutines.sync.withLock
import mu.KotlinLogging
import org.utbot.common.AbstractSettings
import org.utbot.common.getPid
import org.utbot.common.osSpecificJavaExecutable
import org.utbot.common.utBotTempDirectory
import org.utbot.common.*
import org.utbot.framework.UtSettings
import org.utbot.framework.codegen.*
import org.utbot.framework.codegen.model.UtilClassKind
Expand Down Expand Up @@ -81,8 +78,9 @@ class EngineProcess(parent: Lifetime, val project: Project) {
)
}.toPath()
realPath = configPath
logger.info("log configuration path - ${realPath!!.pathString}")
}
return realPath!!.pathString
return realPath.pathString
}

private fun debugArgument(): String {
Expand All @@ -104,14 +102,14 @@ class EngineProcess(parent: Lifetime, val project: Project) {
val java =
JdkInfoService.jdkInfoProvider.info.path.resolve("bin${File.separatorChar}${osSpecificJavaExecutable()}").toString()
val cp = (this.javaClass.classLoader as PluginClassLoader).classPath.baseUrls.joinToString(
separator = ";",
separator = if (isWindows) ";" else ":",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that cp is a classpath string and not a filesystem path in the strict sense, but maybe File.pathSeparator could be used here? What do you think?

prefix = "\"",
postfix = "\""
)
val classname = "org.utbot.framework.process.EngineMainKt"
val javaVersionSpecificArguments = OpenModulesContainer.javaVersionSpecificArguments
val directory = WorkingDirService.provide().toFile()
val log4j2ConfigFile = "\"-Dlog4j2.configurationFile=${getOrCreateLogConfig()}\""
val log4j2ConfigFile = "-Dlog4j2.configurationFile=${getOrCreateLogConfig()}"
val debugArg = debugArgument()
logger.info { "java - $java\nclasspath - $cp\nport - $port" }
val cmd = mutableListOf<String>(java, "-ea")
Expand Down