Hey,
I want to have two separate tasks to run two types of tests from sbt (unit and regression), so ideally I would override the "test" task and create a "test-regression" task. I can easily override the classes which get run in the test task with the following:
testOptions in Test in ThisBuild := Seq(Tests.Filter(s => detect_tsts(s,"unit_test")))
def detect_tsts(s: String, starts_with: String) = {
print("Detected test: "+s)
val valid = s.split("\\.").last.startsWith(starts_with)
if(valid) println("...valid name") else println("...invalid unit test name, skipping")
valid
}
However I'm not sure how to create a separate task which would use a modified list?
lazy val testRegression = TaskKey[Unit]("test-regression", "run regression tests")
def regressionTestTask = testRegression <<= ????
Everything I have tried so far seems to just discard the changes to testOptions
Thanks
David