@@ -74,12 +74,16 @@ object DottyBuild extends Build {
74
74
partestLockFile.createNewFile
75
75
partestLockFile.deleteOnExit
76
76
},
77
- runPartestRunner <<= Def .taskDyn {
77
+ runPartestRunner <<= Def .inputTaskDyn {
78
+ // Magic! This is both an input task and a dynamic task. Apparently
79
+ // command line arguments get passed to the last task in an aliased
80
+ // sequence (see partest alias below), so this works.
81
+ val args = Def .spaceDelimited(" <arg>" ).parsed
78
82
val jars = Seq ((packageBin in Compile ).value.getAbsolutePath) ++
79
83
getJarPaths(partestDeps.value, ivyPaths.value.ivyHome)
80
84
val dottyJars = " -dottyJars " + jars.length + " " + jars.mkString(" " )
81
85
// Provide the jars required on the classpath of run tests
82
- runTask(Test , " dotty.partest.DPConsoleRunner" , dottyJars)
86
+ runTask(Test , " dotty.partest.DPConsoleRunner" , dottyJars + " " + args.mkString( " " ) )
83
87
},
84
88
85
89
// Adjust classpath for running dotty
@@ -170,7 +174,7 @@ object DottyBuild extends Build {
170
174
lazy val partestLockFile = new File (" ." + File .separator + " tests" + File .separator + " locks" + File .separator + s " partest- $pid.lock " )
171
175
def pid = java.lang.Long .parseLong(java.lang.management.ManagementFactory .getRuntimeMXBean().getName().split(" @" )(0 ))
172
176
173
- lazy val runPartestRunner = TaskKey [Unit ](" runPartestRunner" , " Runs partest" )
177
+ lazy val runPartestRunner = InputKey [Unit ](" runPartestRunner" , " Runs partest" )
174
178
175
179
lazy val partestDeps = SettingKey [Seq [ModuleID ]](" partestDeps" , " Finds jars for partest dependencies" )
176
180
def getJarPaths (modules : Seq [ModuleID ], ivyHome : Option [File ]): Seq [String ] = ivyHome match {
0 commit comments