summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSchuyler Eldridge2019-04-16 14:32:29 -0400
committerGitHub2019-04-16 14:32:29 -0400
commitfe5571d5218149ead6df36c82485bce8e31a223f (patch)
tree4e4ff7e9b5c3d0a5184b7778db9d57886b8a0b17
parenta4a29e29c3f1eed18f851dcf10bdc845571dfcb6 (diff)
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 <schuyler.eldridge@ibm.com>
-rw-r--r--build.sbt11
1 files changed, 7 insertions, 4 deletions
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")).