diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2017-03-27 16:37:45 +0200 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2017-03-29 10:33:27 +0200 |
commit | fd37852c0499cf0ca3dcc71333e2ab1f638d8f68 (patch) | |
tree | cfcee801e63c9c6ce8d8dd2bd52ce546ee025991 /project | |
parent | f7e3b7002d1eefbeaac3970be4ac729843d6a939 (diff) | |
download | dotty-fd37852c0499cf0ca3dcc71333e2ab1f638d8f68.tar.gz dotty-fd37852c0499cf0ca3dcc71333e2ab1f638d8f68.tar.bz2 dotty-fd37852c0499cf0ca3dcc71333e2ab1f638d8f68.zip |
Add test filtering via `filterTest <regex>`
Diffstat (limited to 'project')
-rw-r--r-- | project/Build.scala | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/project/Build.scala b/project/Build.scala index baebaedf5..bb02416cc 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -47,6 +47,9 @@ object Build { // Spawns a repl with the correct classpath lazy val repl = inputKey[Unit]("run the REPL with correct classpath") + // Run tests with filter + lazy val filterTest = inputKey[Unit]("runs integration test with the supplied filter") + // Used to compile files similar to ./bin/dotc script lazy val dotc = inputKey[Unit]("run the compiler using the correct classpath, or the user supplied classpath") @@ -288,7 +291,6 @@ object Build { libraryDependencies += "org.scala-lang.modules" %% "scala-partest" % "1.0.11" % "test", testOptions in Test += Tests.Cleanup({ () => partestLockFile.delete }), // this option is needed so that partest doesn't run - testOptions += Tests.Argument(TestFrameworks.JUnit, "--exclude-categories=dotty.tools.dotc.ParallelTesting"), partestDeps := Seq( scalaCompiler, "org.scala-lang" % "scala-reflect" % scalacVersion, @@ -338,6 +340,14 @@ object Build { ) }.evaluated, + filterTest := Def.inputTaskDyn { + val args: Seq[String] = spaceDelimited("<arg>").parsed + testOptions := Seq() + (testOnly in Test).toTask( + " dotty.tools.dotc.CompilationTests -- -Ddotty.partest.filter=" + args.head + ) + }.evaluated, + // Override run to be able to run compiled classfiles dotr := { val args: Seq[String] = spaceDelimited("<arg>").parsed |