Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix according to review
  • Loading branch information
SBOne-Kenobi committed Nov 9, 2022
commit dfb6292494d64278e13f223f24f97204d4c46260
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import org.utbot.features.FeatureExtractorFactoryImpl
import org.utbot.features.FeatureProcessorWithStatesRepetitionFactory
import org.utbot.framework.PathSelectorType
import org.utbot.framework.UtSettings
import org.utbot.framework.plugin.api.util.UtContext
import org.utbot.framework.plugin.api.util.id
import org.utbot.framework.plugin.api.util.withUtContext
import org.utbot.framework.plugin.services.JdkInfoService
Expand All @@ -47,7 +46,7 @@ private val javaHome = System.getenv("JAVA_HOME")
private val javacCmd = "$javaHome/bin/javac"
private val javaCmd = "$javaHome/bin/java"

private const val triesToCompile = 2
private const val compileAttempts = 2

private data class UnnamedPackageInfo(val pack: String, val module: String)

Expand All @@ -64,7 +63,7 @@ private fun compileClass(testDir: String, classPath: String, testClass: String):
val exports = mutableSetOf<UnnamedPackageInfo>()
var exitCode = 0

repeat(triesToCompile) { tryNumber ->
repeat(compileAttempts) { attemptNumber ->
val cmd = arrayOf(
javacCmd,
*exports.flatMap {
Expand All @@ -76,7 +75,7 @@ private fun compileClass(testDir: String, classPath: String, testClass: String):
"-XDignore.symbol.file",
testClass
)
logger.debug { "Compile try ${tryNumber + 1}" }
logger.debug { "Compile attempt ${attemptNumber + 1}" }

logger.trace { cmd.toText() }

Expand Down