diff options
-rw-r--r-- | build.sbt | 3 | ||||
-rw-r--r-- | project/PartestUtil.scala | 4 |
2 files changed, 7 insertions, 0 deletions
@@ -1018,6 +1018,9 @@ commands += Command("partest")(_ => PartestUtil.partestParser((baseDirectory in ("test/it:testOnly -- " + parsed) :: state } +// Watch the test files also so ~partest triggers on test case changes +watchSources ++= PartestUtil.testFilePaths((baseDirectory in ThisBuild).value, (baseDirectory in ThisBuild).value / "test") + // Add tab completion to scalac et al. commands ++= { val commands = diff --git a/project/PartestUtil.scala b/project/PartestUtil.scala index 127dcafefa..6d2c9a4c45 100644 --- a/project/PartestUtil.scala +++ b/project/PartestUtil.scala @@ -26,6 +26,10 @@ object PartestUtil { isParentOf(testBase / srcPath, f, 2) || isParentOf(f, testBase / srcPath, Int.MaxValue) } } + + def testFilePaths(globalBase: File, testBase: File): Seq[java.io.File] = + (new TestFiles("files", globalBase, testBase)).allTestCases.map(_._1) + /** A parser for the custom `partest` command */ def partestParser(globalBase: File, testBase: File): Parser[String] = { val knownUnaryOptions = List( |