I have 3 test source folders in my project. I have added the following key to build.sbt (version of SBT: 1.2.1):
sourceDirectories in Test := baseDirectory { base =>
Seq(
base / "src/test/common/scala",
base / "src/test/unit/scala",
base / "src/test/functional/scala"
)
}.value
SBT correctly recognized the folders:
sbt test:sourceDirectories
...
[info] Set current project to service (in build file:/myprojectfolder/)
[info] * /myprojectfolder/src/test/common/scala
[info] * /myprojectfolder/src/test/unit/scala
[info] * /myprojectfolder/src/test/functional/scala
but test:compile doesn't produce any test classes in target/scala-2.11/test-classes and in result test task doesn't run any tests.
I'm using ScalaTest 3.0.5 although that doesn't seem relevant.
Any ideas why SBT ignores test scala sources during compilation?
unmanagedSourceDirectories in Test- manuzhang