From fe5571d5218149ead6df36c82485bce8e31a223f Mon Sep 17 00:00:00 2001 From: Schuyler Eldridge Date: Tue, 16 Apr 2019 14:32:29 -0400 Subject: Fork all sbt run and test tasks (#1000) This causes sbt tasks (run, test, etc.) to fork to a separate JVM to avoid running out of metaspace. This issue crops up for developers or users repeatedly running sbt tasks in the same sbt session. Signed-off-by: Schuyler Eldridge --- build.sbt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'build.sbt') diff --git a/build.sbt b/build.sbt index 25b38fe4..0d050f9d 100644 --- a/build.sbt +++ b/build.sbt @@ -109,14 +109,17 @@ lazy val chiselSettings = Seq ( "org.scalacheck" %% "scalacheck" % "1.14.0" % "test", "com.github.scopt" %% "scopt" % "3.7.0" ), - + javacOptions ++= javacOptionsVersion(scalaVersion.value) +) ++ ( // Tests from other projects may still run concurrently // if we're not running with -DminimalResources. // Another option would be to experiment with: // concurrentRestrictions in Global += Tags.limit(Tags.Test, 1), - Test / parallelExecution := !sys.props.contains("minimalResources"), - - javacOptions ++= javacOptionsVersion(scalaVersion.value) + sys.props.contains("minimalResources") match { + case true => Seq( Test / parallelExecution := false ) + case false => Seq( fork := true, + Test / testForkedParallel := true ) + } ) lazy val coreMacros = (project in file("coreMacros")). -- cgit v1.2.3