Skip to content

Commit

Permalink
Support tests on Linux without wrapper
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 3ba9440240e8d80e1b85c51cb64eb7f25eb57947
  • Loading branch information
MaXal authored and intellij-monorepo-bot committed Aug 30, 2023
1 parent f8868a7 commit 4728c9d
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
package com.intellij.ide.starter.process

import com.intellij.ide.starter.di.di
import com.intellij.ide.starter.path.GlobalPaths
import com.intellij.ide.starter.process.exec.ExecOutputRedirect
import com.intellij.ide.starter.process.exec.ProcessExecutor
import com.intellij.ide.starter.system.SystemInfo
import com.intellij.ide.starter.utils.catchAll
import com.intellij.ide.starter.utils.logOutput
import com.intellij.ide.starter.utils.withRetry
import org.kodein.di.direct
import org.kodein.di.instance
import java.nio.file.Path
import kotlin.io.path.isRegularFile
import kotlin.time.Duration.Companion.minutes
Expand Down Expand Up @@ -231,6 +228,11 @@ private fun getJavaProcessId(javaHome: Path, workDir: Path, originalProcessId: L
}
}

if (originalProcess.info().command().get().contains("java")){
logOutput("The test was run without wrapper, add original pid")
candidatesFromProcessHandle.add(originalProcess.pid())
}

originalProcess.toHandle().descendants().forEach { processHandle ->
val command = processHandle.info().command()
if (command.isPresent && command.get().contains("java")) {
Expand Down

0 comments on commit 4728c9d

Please sign in to comment.