Skip to content

Commit

Permalink
Introducing a way to configure additional Java options (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
august782 authored Jan 5, 2024
1 parent 9042072 commit e1c98b9
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import edu.illinois.cs.testrunner.execution.Executor
import edu.illinois.cs.testrunner.util._

import scala.collection.JavaConverters._
import scala.collection.mutable.ListBuffer
import scala.io.Source
import scala.util.{Failure, Try}

Expand Down Expand Up @@ -39,6 +40,17 @@ trait Runner {
builder.javaAgent(Paths.get(Configuration.config().getProperty("testplugin.javaagent")))
}

if (!Configuration.config().getProperty("testplugin.javaopts", "").equals("")) {
val javaopts = Configuration.config().getProperty("testplugin.javaopts", "").split(",")
val javaoptsList = new ListBuffer[String]()
for (opt <- javaopts) {
javaoptsList += opt
}
if (!javaoptsList.isEmpty) {
builder.javaOpts(javaoptsList.toList)
}
}

builder.environment(environment())
}

Expand Down

0 comments on commit e1c98b9

Please sign in to comment.