@@ -56,10 +56,12 @@ val bootstrapScalaVersion = "2.11.5"
56
56
val scalaParserCombinatorsDep = " org.scala-lang.modules" %% " scala-parser-combinators" % versionNumber(" scala-parser-combinators" ) exclude(" org.scala-lang" , " scala-library" )
57
57
val scalaXmlDep = " org.scala-lang.modules" %% " scala-xml" % versionNumber(" scala-xml" ) exclude(" org.scala-lang" , " scala-library" )
58
58
val partestDep = " org.scala-lang.modules" %% " scala-partest" % versionNumber(" partest" ) exclude(" org.scala-lang" , " scala-library" )
59
+ val partestInterfaceDep = " org.scala-lang.modules" %% " scala-partest-interface" % " 0.5.0" exclude(" org.scala-lang" , " scala-library" )
59
60
val junitDep = " junit" % " junit" % " 4.11"
60
61
val junitIntefaceDep = " com.novocode" % " junit-interface" % " 0.11" % " test"
61
62
val jlineDep = " jline" % " jline" % versionProps(" jline.version" )
62
63
val antDep = " org.apache.ant" % " ant" % " 1.9.4"
64
+ val scalacheckDep = " org.scalacheck" %% " scalacheck" % " 1.11.4" exclude(" org.scala-lang" , " scala-library" )
63
65
64
66
lazy val commonSettings = clearSourceAndResourceDirectories ++ Seq [Setting [_]](
65
67
organization := " org.scala-lang" ,
@@ -179,6 +181,10 @@ lazy val compiler = configureAsSubproject(project)
179
181
180
182
lazy val interactive = configureAsSubproject(project)
181
183
.settings(disableDocsAndPublishingTasks : _* )
184
+ .settings(
185
+ scalaVersion := bootstrapScalaVersion,
186
+ ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true ) }
187
+ )
182
188
.dependsOn(compiler)
183
189
184
190
lazy val repl = configureAsSubproject(project)
@@ -230,6 +236,61 @@ lazy val junit = project.in(file("test") / "junit")
230
236
unmanagedSourceDirectories in Test := List (baseDirectory.value)
231
237
)
232
238
239
+ lazy val partestJavaAgent = (project in file(" ." ) / " src" / " partest-javaagent" ).
240
+ dependsOn(asm).
241
+ settings(commonSettings : _* ).
242
+ settings(
243
+ doc := file(" !!! NO DOCS !!!" ),
244
+ publishLocal := {},
245
+ publish := {},
246
+ scalaVersion := bootstrapScalaVersion,
247
+ ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true ) },
248
+ // Setting name to "scala-partest-javaagent" so that the jar file gets that name, which the Runner relies on
249
+ name := " scala-partest-javaagent" ,
250
+ // writing jar file to /build/pack/lib because that's where it's expected to be found
251
+ artifactPath in packageBin in Compile := {
252
+ val resolvedArtifact = artifact.value
253
+ root.base / s " build/pack/lib/ ${resolvedArtifact.name}. ${resolvedArtifact.extension}"
254
+ },
255
+ // add required manifest entry - previously included from file
256
+ packageOptions in (Compile , packageBin) +=
257
+ Package .ManifestAttributes ( " Premain-Class" -> " scala.tools.partest.javaagent.ProfilingAgent" ),
258
+ // we need to build this to a JAR
259
+ exportJars := true
260
+ )
261
+
262
+ lazy val test = project.
263
+ dependsOn(compiler, interactive, actors, repl, scalap, partestExtras, partestJavaAgent, asm, scaladoc).
264
+ configs(IntegrationTest ).
265
+ settings(disableDocsAndPublishingTasks : _* ).
266
+ settings(commonSettings : _* ).
267
+ settings(Defaults .itSettings: _* ).
268
+ settings(
269
+ scalaVersion := bootstrapScalaVersion,
270
+ ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true ) },
271
+ libraryDependencies ++= Seq (partestDep, scalaXmlDep, partestInterfaceDep, scalacheckDep),
272
+ unmanagedBase in Test := baseDirectory.value / " files" / " lib" ,
273
+ unmanagedJars in Test <+= (unmanagedBase) (j => Attributed .blank(j)) map(identity),
274
+ // no main sources
275
+ sources in Compile := Seq .empty,
276
+ // test sources are compiled in partest run, not here
277
+ sources in IntegrationTest := Seq .empty,
278
+ fork in IntegrationTest := true ,
279
+ javaOptions in IntegrationTest += " -Xmx1G" ,
280
+ testFrameworks += new TestFramework (" scala.tools.partest.Framework" ),
281
+ testOptions in IntegrationTest += Tests .Setup ( () => root.base.getAbsolutePath + " /pull-binary-libs.sh" ! ),
282
+ definedTests in IntegrationTest += (
283
+ new sbt.TestDefinition (
284
+ " partest" ,
285
+ // marker fingerprint since there are no test classes
286
+ // to be discovered by sbt:
287
+ new sbt.testing.AnnotatedFingerprint {
288
+ def isModule = true
289
+ def annotationName = " partest"
290
+ }, true , Array ())
291
+ )
292
+ )
293
+
233
294
lazy val root = (project in file(" ." )).
234
295
aggregate(library, forkjoin, reflect, compiler, asm, interactive, repl,
235
296
scaladoc, scalap, actors, partestExtras, junit).settings(
0 commit comments