Skip to content
This repository was archived by the owner on Sep 1, 2020. It is now read-only.

Commit 2d85fe4

Browse files
lrytzszeiger
authored andcommitted
Fix test failures of the sbt build in 2.12.x
- More memory for compiling partest tests - Enable more detailed logging for partest failures: Partest’s `AntRunner` has extra code for logging details of all failed tests at the end of a run which is not present in `SbtRunner` but we can set the `--show-log` and `--show-diff` options to get similar output interspersed with the main test log. - Update OSGi test dependencies for sbt build to same versions as in ant (see 8247b8f for the motivation for this change). - Disable MiMa checks (to be reactivated after M5).
1 parent e4c2d68 commit 2d85fe4

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

build.sbt

+11-12
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ lazy val publishSettings : Seq[Setting[_]] = Seq(
112112
globalVersionSettings
113113
baseVersion in Global := "2.12.0"
114114
baseVersionSuffix in Global := "SNAPSHOT"
115-
mimaReferenceVersion in Global := Some("2.11.0")
115+
mimaReferenceVersion in Global := None
116116

117117
lazy val commonSettings = clearSourceAndResourceDirectories ++ publishSettings ++ Seq[Setting[_]](
118118
organization := "org.scala-lang",
@@ -567,11 +567,11 @@ lazy val junit = project.in(file("test") / "junit")
567567

568568
lazy val osgiTestFelix = osgiTestProject(
569569
project.in(file(".") / "target" / "osgiTestFelix"),
570-
"org.apache.felix" % "org.apache.felix.framework" % "4.4.0")
570+
"org.apache.felix" % "org.apache.felix.framework" % "5.0.1")
571571

572572
lazy val osgiTestEclipse = osgiTestProject(
573573
project.in(file(".") / "target" / "osgiTestEclipse"),
574-
"org.eclipse.osgi" % "org.eclipse.osgi" % "3.7.1")
574+
"org.eclipse.tycho" % "org.eclipse.osgi" % "3.10.100.v20150521-1310")
575575

576576
def osgiTestProject(p: Project, framework: ModuleID) = p
577577
.dependsOn(library, reflect, compiler)
@@ -583,19 +583,18 @@ def osgiTestProject(p: Project, framework: ModuleID) = p
583583
fork in Test := true,
584584
parallelExecution in Test := false,
585585
libraryDependencies ++= {
586-
val paxExamVersion = "3.5.0" // Last version which supports Java 6
586+
val paxExamVersion = "4.5.0" // Last version which supports Java 6
587587
Seq(
588588
junitDep,
589589
junitInterfaceDep,
590-
"org.ops4j.pax.exam" % "pax-exam-container-native" % paxExamVersion
591-
exclude("org.osgi", "org.osgi.core"), // Avoid dragging in a dependency which requires Java >6
592-
"org.osgi" % "org.osgi.core" % "4.2.0" % "provided", // The framework (Felix / Eclipse) provides the classes
590+
"org.ops4j.pax.exam" % "pax-exam-container-native" % paxExamVersion,
593591
"org.ops4j.pax.exam" % "pax-exam-junit4" % paxExamVersion,
594592
"org.ops4j.pax.exam" % "pax-exam-link-assembly" % paxExamVersion,
595-
"org.ops4j.pax.url" % "pax-url-aether" % "2.2.0",
596-
"org.ops4j.pax.swissbox" % "pax-swissbox-tracker" % "1.8.0",
597-
"ch.qos.logback" % "logback-core" % "1.1.2",
598-
"ch.qos.logback" % "logback-classic" % "1.1.2",
593+
"org.ops4j.pax.url" % "pax-url-aether" % "2.4.1",
594+
"org.ops4j.pax.swissbox" % "pax-swissbox-tracker" % "1.8.1",
595+
"ch.qos.logback" % "logback-core" % "1.1.3",
596+
"ch.qos.logback" % "logback-classic" % "1.1.3",
597+
"org.slf4j" % "slf4j-api" % "1.7.12",
599598
framework % "test"
600599
)
601600
},
@@ -658,7 +657,7 @@ lazy val test = project
658657
// test sources are compiled in partest run, not here
659658
sources in IntegrationTest := Seq.empty,
660659
fork in IntegrationTest := true,
661-
javaOptions in IntegrationTest += "-Xmx1G",
660+
javaOptions in IntegrationTest += "-Xmx2G",
662661
testFrameworks += new TestFramework("scala.tools.partest.sbt.Framework"),
663662
testOptions in IntegrationTest += Tests.Argument("-Dpartest.java_opts=-Xmx1024M -Xms64M -XX:MaxPermSize=128M"),
664663
testOptions in IntegrationTest += Tests.Argument("-Dpartest.scalac_opts=" + (scalacOptions in Compile).value.mkString(" ")),

project/ScriptCommands.scala

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ object ScriptCommands {
2525
Project.extract(state).append(Seq(
2626
resolvers in Global += "scala-pr" at url,
2727
scalacOptions in Compile in ThisBuild += "-opt:l:classpath",
28+
testOptions in IntegrationTest in LocalProject("test") ++= Seq(Tests.Argument("--show-log"), Tests.Argument("--show-diff")),
2829
logLevel in ThisBuild := Level.Info,
2930
logLevel in update in ThisBuild := Level.Warn
3031
), state)

0 commit comments

Comments
 (0)