From 73ddbf29bfd0fb5f91081820dbc95193cbb7af09 Mon Sep 17 00:00:00 2001 From: hrj Date: Sun, 25 Sep 2016 18:15:25 +0530 Subject: [PATCH] internal: run tests in forked JVM ... so that `System.exit` during test doesn't quit sbt --- cli/build.sbt | 2 ++ cli/src/test/scala/co/uproot/abandon/CliTestRunner.scala | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cli/build.sbt b/cli/build.sbt index 5fda3d9a..5e3a00ef 100644 --- a/cli/build.sbt +++ b/cli/build.sbt @@ -1,3 +1,5 @@ import Dependencies._ libraryDependencies += scalatest % "test" + +fork in Test := true diff --git a/cli/src/test/scala/co/uproot/abandon/CliTestRunner.scala b/cli/src/test/scala/co/uproot/abandon/CliTestRunner.scala index 3216cc8a..1e30e28b 100644 --- a/cli/src/test/scala/co/uproot/abandon/CliTestRunner.scala +++ b/cli/src/test/scala/co/uproot/abandon/CliTestRunner.scala @@ -9,7 +9,7 @@ class CliTestRunner extends FlatSpec with Matchers with Inside { "Testrunner" should "automatically test multiple dirs and confs" in { val testConfs = - for (d <- FileUtils.listDirs("testCases", ".*/sclT[0-9]+(-.*)$")) yield { + for (d <- FileUtils.listDirs("../testCases", ".*/sclT[0-9]+(-.*)$")) yield { for (f <- FileUtils.listFilesRecursive(d.getAbsolutePath, ".*\\.conf$")) yield { f } }