diff --git a/akka-docs/rst/dev/multi-jvm-testing.rst b/akka-docs/rst/dev/multi-jvm-testing.rst index 2d96747d58..1d3c498015 100644 --- a/akka-docs/rst/dev/multi-jvm-testing.rst +++ b/akka-docs/rst/dev/multi-jvm-testing.rst @@ -21,7 +21,7 @@ You can then add multi-JVM testing to ``project/Build.scala`` by including the ` settings and config. Please note that MultiJvm test sources are located in ``src/multi-jvm/...``, and not in ``src/test/...``. -Here is an example Build.scala file that uses the MultiJvm plugin: +Here is an example Build.scala file for sbt 0.12 that uses the MultiJvm plugin: .. parsed-literal:: @@ -78,6 +78,30 @@ Here is an example Build.scala file that uses the MultiJvm plugin: } } +If you are using sbt 0.13 the multiJvmSettings in the Build.scala file looks like this instead: + +.. parsed-literal:: + + lazy val multiJvmSettings = SbtMultiJvm.multiJvmSettings ++ Seq( + // make sure that MultiJvm test are compiled by the default test compilation + compile in MultiJvm <<= (compile in MultiJvm) triggeredBy (compile in Test), + // disable parallel tests + parallelExecution in Test := false, + // make sure that MultiJvm tests are executed by the default test target + executeTests in Test <<= + ((executeTests in Test), (executeTests in MultiJvm)) map { + case ((testResults), (multiJvmResults)) => + val overall = + if (testResults.overall.id < multiJvmResults.overall.id) + multiJvmResults.overall + else + testResults.overall + Tests.Output(overall, + testResults.events ++ multiJvmResults.events, + testResults.summaries ++ multiJvmResults.summaries) + } + ) + You can specify JVM options for the forked JVMs:: jvmOptions in MultiJvm := Seq("-Xmx256M") diff --git a/project/plugins.sbt b/project/plugins.sbt index 3853b68cc7..a2fc66b2a6 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,7 +3,7 @@ resolvers += Classpaths.typesafeResolver // these comment markers are for including code into the docs //#sbt-multi-jvm -addSbtPlugin("com.typesafe.sbt" % "sbt-multi-jvm" % "0.3.6") +addSbtPlugin("com.typesafe.sbt" % "sbt-multi-jvm" % "0.3.8") //#sbt-multi-jvm addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.0.0")