-
Notifications
You must be signed in to change notification settings - Fork 1k
[2.x] ignore root project tests #8772
Copy link
Copy link
Closed
Labels
Description
steps
xuwei-k/sbt-2-root-test-empty-aggregate@4395904
b/build.sbt
val common = Def.settings(
scalaVersion := "2.13.18"
)
lazy val a = project
.settings(
common,
)
lazy val b = project
.in(file("."))
.settings(
common,
libraryDependencies += "org.scalatest" %% "scalatest-funsuite" % "3.2.19" % Test,
)
.dependsOn(a)
.aggregate(a)project/build.properties
sbt.version=2.0.0-RC9src/test/scala/Test1.scala
package example
import org.scalatest.funsuite.AnyFunSuite
class Test1 extends AnyFunSuite {
fail("This test should fail")
}problem
sbt testFull
[success] elapsed time: 1 s
expectation
run example.Test1 and then report failure. same as sbt 1.x
notes
sbt 1.12.3
[info] compiling 1 Scala source to /home/runner/work/sbt-2-root-test-empty-aggregate/sbt-2-root-test-empty-aggregate/target/scala-2.13/test-classes ...
[info] done compiling
[info] Test1:
[info] example.Test1 *** ABORTED ***
[info] This test should fail (Test1.scala:6)
[info] Run completed in 134 milliseconds.
[info] Total number of tests run: 0
[info] Suites: completed 0, aborted 1
[info] Tests: succeeded 0, failed 0, canceled 0, ignored 0, pending 0
[info] *** 1 SUITE ABORTED ***
[error] Error during tests:
[error] example.Test1
[error] (Test / test) sbt.TestsFailedException: Tests unsuccessful
Reactions are currently unavailable