Skip to content

Commit

Permalink
Merge pull request #10074 from som-snytt/tweak/jvm18-allow-securitymgr
Browse files Browse the repository at this point in the history
Allow security manager for partest on JVM18
  • Loading branch information
lrytz committed Jul 18, 2022
2 parents 2e24de0 + ba88c74 commit f347e56
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,7 @@ lazy val test = project
IntegrationTest / fork := true,
Compile / scalacOptions += "-Yvalidate-pos:parser,typer",
IntegrationTest / javaOptions ++= List("-Xmx2G", "-Dpartest.exec.in.process=true", "-Dfile.encoding=UTF-8", "-Duser.language=en", "-Duser.country=US") ++ addOpensForTesting,
IntegrationTest / javaOptions ++= { if (scala.util.Properties.isJavaAtLeast("18")) List("-Djava.security.manager=allow") else Nil },
IntegrationTest / testOptions += Tests.Argument("-Dfile.encoding=UTF-8", "-Duser.language=en", "-Duser.country=US"),
testFrameworks += new TestFramework("scala.tools.partest.sbt.Framework"),
IntegrationTest / testOptions += Tests.Argument(s"-Dpartest.java_opts=-Xmx1024M -Xms64M ${addOpensForTesting.mkString(" ")}"),
Expand Down
5 changes: 3 additions & 2 deletions src/partest/scala/tools/partest/nest/AbstractRunner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,10 @@ class AbstractRunner(val config: RunnerSpec.Config, protected final val testSour
}
}

def files_s = failed0.map(_.testFile).mkString(""" \""" + "\n ")
val bslash = "\\"
def files_s = failed0.map(_.testFile).mkString(s" ${bslash}\n ")
echo("# Failed test paths (this command will update checkfiles)")
echo(partestCmd + " --update-check \\\n " + files_s + "\n")
echo(s"$partestCmd --update-check ${bslash}\n $files_s\n")
}

if (printSummary) {
Expand Down

0 comments on commit f347e56

Please sign in to comment.