Skip to content

Commit 7b57ab0

Browse files
committed
Restore the working directory of partest, junit to the project root
We lost this in the SBT 1.x upgrade.
1 parent 42d69ab commit 7b57ab0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

build.sbt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,8 @@ lazy val junit = project.in(file("test") / "junit")
601601
.settings(
602602
fork in Test := true,
603603
javaOptions in Test += "-Xss1M",
604+
(forkOptions in Test) := (forkOptions in Test).value.withWorkingDirectory((baseDirectory in ThisBuild).value),
605+
(forkOptions in Test in testOnly) := (forkOptions in Test in testOnly).value.withWorkingDirectory((baseDirectory in ThisBuild).value),
604606
libraryDependencies ++= Seq(junitDep, junitInterfaceDep, jolDep),
605607
testOptions += Tests.Argument(TestFrameworks.JUnit, "-a", "-v"),
606608
unmanagedSourceDirectories in Compile := Nil,
@@ -724,6 +726,7 @@ lazy val test = project
724726
testFrameworks += new TestFramework("scala.tools.partest.sbt.Framework"),
725727
testOptions in IntegrationTest += Tests.Argument("-Dpartest.java_opts=-Xmx1024M -Xms64M"),
726728
testOptions in IntegrationTest += Tests.Argument("-Dpartest.scalac_opts=" + (scalacOptions in Compile).value.mkString(" ")),
729+
(forkOptions in IntegrationTest) := (forkOptions in IntegrationTest).value.withWorkingDirectory((baseDirectory in ThisBuild).value),
727730
testOptions in IntegrationTest += {
728731
val cp = (dependencyClasspath in Test).value
729732
val baseDir = (baseDirectory in ThisBuild).value

0 commit comments

Comments
 (0)