Open dos65 opened 6 years ago
Setup project with following build.sbt:
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.1" fork in (Test, test) := true javaOptions in (Test, test) ++= Seq("-Dkey=value")
add test in src/main/test and run sbt test
src/main/test
sbt test
Sbt doesn't actually fork test execution, test from gist always fail. Sometimes it's possible to see a warning about it:
[warn] javaOptions will be ignored, fork is set to false
Should use fork value.
That problem appeared from 1.0.0. For test it applies changes only for Config.
1.0.0
test
Config
fork in Test := true // ok fork in IntegrationTest := true // ok
I tried to reproduce the same behavior of fork in run, but it works well:
fork
run
fork in (Test, run) := true // ok fork in (Compile, run) := true // ok
sbt version: 1.1.0-RC2
Thanks for the detailed report.
steps
Setup project with following build.sbt:
add test in
src/main/test
and runsbt test
problem
Sbt doesn't actually fork test execution, test from gist always fail. Sometimes it's possible to see a warning about it:
expectation
Should use fork value.
notes
That problem appeared from
1.0.0
. Fortest
it applies changes only forConfig
.I tried to reproduce the same behavior of
fork
inrun
, but it works well:sbt version: 1.1.0-RC2