diff options
author | vsalvis <salvisbergvera@gmail.com> | 2015-05-13 12:18:39 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-05-13 12:50:12 +0200 |
commit | e9e394093e4cb885ce11d597cd94b4c8f1a0e0ae (patch) | |
tree | 3d06e822abe85b399dc3d6a96a9eb4dff9ffb9f8 /project/Build.scala | |
parent | cb5b6a0d85be25b76946b8bfc6821c7e399463a6 (diff) | |
download | dotty-e9e394093e4cb885ce11d597cd94b4c8f1a0e0ae.tar.gz dotty-e9e394093e4cb885ce11d597cd94b4c8f1a0e0ae.tar.bz2 dotty-e9e394093e4cb885ce11d597cd94b4c8f1a0e0ae.zip |
Partest command line options (same as scala) useable from sbt
Diffstat (limited to 'project/Build.scala')
-rw-r--r-- | project/Build.scala | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/project/Build.scala b/project/Build.scala index 504185e65..271e54f87 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -74,12 +74,16 @@ object DottyBuild extends Build { partestLockFile.createNewFile partestLockFile.deleteOnExit }, - runPartestRunner <<= Def.taskDyn { + runPartestRunner <<= Def.inputTaskDyn { + // Magic! This is both an input task and a dynamic task. Apparently + // command line arguments get passed to the last task in an aliased + // sequence (see partest alias below), so this works. + val args = Def.spaceDelimited("<arg>").parsed val jars = Seq((packageBin in Compile).value.getAbsolutePath) ++ getJarPaths(partestDeps.value, ivyPaths.value.ivyHome) val dottyJars = "-dottyJars " + jars.length + " " + jars.mkString(" ") // Provide the jars required on the classpath of run tests - runTask(Test, "dotty.partest.DPConsoleRunner", dottyJars) + runTask(Test, "dotty.partest.DPConsoleRunner", dottyJars + " " + args.mkString(" ")) }, // Adjust classpath for running dotty @@ -170,7 +174,7 @@ object DottyBuild extends Build { lazy val partestLockFile = new File("." + File.separator + "tests" + File.separator + "locks" + File.separator + s"partest-$pid.lock") def pid = java.lang.Long.parseLong(java.lang.management.ManagementFactory.getRuntimeMXBean().getName().split("@")(0)) - lazy val runPartestRunner = TaskKey[Unit]("runPartestRunner", "Runs partest") + lazy val runPartestRunner = InputKey[Unit]("runPartestRunner", "Runs partest") lazy val partestDeps = SettingKey[Seq[ModuleID]]("partestDeps", "Finds jars for partest dependencies") def getJarPaths(modules: Seq[ModuleID], ivyHome: Option[File]): Seq[String] = ivyHome match { |