Skip to content

Commit dbb5274

Browse files
retronymadriaanm
authored andcommitted
test task runs Junit tests
Add dependency on scaladoc in junit subproject, as required by 6e6632e (it introduced a junit test for scaladoc). Enable assertion stack traces and info logging of each test.
1 parent fc2b35a commit dbb5274

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

build.sbt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ val scalaParserCombinatorsDep = "org.scala-lang.modules" %% "scala-parser-combin
5757
val scalaXmlDep = "org.scala-lang.modules" %% "scala-xml" % versionNumber("scala-xml") exclude("org.scala-lang", "scala-library")
5858
val partestDep = "org.scala-lang.modules" %% "scala-partest" % versionNumber("partest") exclude("org.scala-lang", "scala-library")
5959
val junitDep = "junit" % "junit" % "4.11"
60+
val junitIntefaceDep = "com.novocode" % "junit-interface" % "0.11" % "test"
6061
val jlineDep = "jline" % "jline" % versionProps("jline.version")
6162
val antDep = "org.apache.ant" % "ant" % "1.9.4"
6263

@@ -217,13 +218,15 @@ lazy val partestExtras = configureAsSubproject(Project("partest-extras", file(".
217218
)
218219

219220
lazy val junit = project.in(file("test") / "junit")
220-
.dependsOn(library, reflect, compiler, partestExtras)
221+
.dependsOn(library, reflect, compiler, partestExtras, scaladoc)
221222
.settings(clearSourceAndResourceDirectories: _*)
222223
.settings(commonSettings: _*)
223224
.settings(
224225
scalaVersion := bootstrapScalaVersion,
225226
ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) },
226-
libraryDependencies += junitDep,
227+
fork in Test := true,
228+
libraryDependencies ++= Seq(junitDep, junitIntefaceDep),
229+
testOptions += Tests.Argument(TestFrameworks.JUnit, "-a", "-v"),
227230
unmanagedSourceDirectories in Test := List(baseDirectory.value)
228231
)
229232

0 commit comments

Comments
 (0)