diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-03-12 16:02:45 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-04-09 16:35:30 +0200 |
commit | d010cef9d0f62b727a35140d470472ab8f8355f5 (patch) | |
tree | 00df7ddb33ca0be4028a43a1adc2fe1b908e2c24 /project/Build.scala | |
parent | 6bc463df6a6ea8312390915a65024b11cfdd2b77 (diff) | |
download | dotty-d010cef9d0f62b727a35140d470472ab8f8355f5.tar.gz dotty-d010cef9d0f62b727a35140d470472ab8f8355f5.tar.bz2 dotty-d010cef9d0f62b727a35140d470472ab8f8355f5.zip |
Context escape detection.
During creation of each of DottyTests context is stolen from test and a
WeakReference for it is created.
After running all tests references are examined to detect if any of them
has leaked.
Diffstat (limited to 'project/Build.scala')
-rw-r--r-- | project/Build.scala | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/project/Build.scala b/project/Build.scala index 8442ce5de..310a7d05e 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -15,7 +15,7 @@ object DottyBuild extends Build { resourceDirectory in Compile := baseDirectory.value / "resources", unmanagedSourceDirectories in Compile := Seq((scalaSource in Compile).value), unmanagedSourceDirectories in Test := Seq((scalaSource in Test).value), - + // include sources in eclipse (downloads source code for all dependencies) //http://stackoverflow.com/questions/10472840/how-to-attach-sources-to-sbt-managed-dependencies-in-scala-ide#answer-11683728 com.typesafe.sbteclipse.plugin.EclipsePlugin.EclipseKeys.withSource := true, @@ -28,17 +28,19 @@ object DottyBuild extends Build { "org.scala-lang.modules" %% "scala-xml" % "1.0.1"), // get junit onboard - libraryDependencies += "com.novocode" % "junit-interface" % "0.9" % "test", + libraryDependencies += "com.novocode" % "junit-interface" % "0.11-RC1" % "test", // scalac options scalacOptions in Global ++= Seq("-feature", "-deprecation", "-language:_"), // enable verbose exception messages for JUnit - testOptions += Tests.Argument(TestFrameworks.JUnit, "-a", "-v"), + testOptions += Tests.Argument(TestFrameworks.JUnit, "-a", "-v", "--run-listener=test.ContextEscapeDetector"), // Adjust classpath for running dotty mainClass in (Compile, run) := Some("dotty.tools.dotc.Main"), fork in run := true, fork in Test := true, + parallelExecution in Test := false, + // http://grokbase.com/t/gg/simple-build-tool/135ke5y90p/sbt-setting-jvm-boot-paramaters-for-scala javaOptions <++= (managedClasspath in Runtime, packageBin in Compile) map { (attList, bin) => // put the Scala {library, reflect, compiler} in the classpath |