@@ -577,23 +577,8 @@ object Build {
577577 jarOpts ::: tuning ::: agentOptions ::: ci_build ::: path.toList
578578 },
579579
580- testCompilation := Def .inputTaskDyn {
581- val args : Seq [String ] = spaceDelimited(" <arg>" ).parsed
582- val cmd = " dotty.tools.dotc.CompilationTests -- --exclude-categories=dotty.SlowTests" + {
583- if (args.nonEmpty) " -Ddotty.tests.filter=" + args.mkString(" " )
584- else " "
585- }
586- (testOnly in Test ).toTask(cmd)
587- }.evaluated,
588-
589- testFromTasty := Def .inputTaskDyn {
590- val args : Seq [String ] = spaceDelimited(" <arg>" ).parsed
591- val cmd = " dotty.tools.dotc.FromTastyTests -- " + {
592- if (args.nonEmpty) " -Ddotty.tests.filter=" + args.mkString(" " )
593- else " "
594- }
595- (testOnly in Test ).toTask(cmd)
596- }.evaluated,
580+ testCompilation := testOnlyFiltered(" dotty.tools.dotc.CompilationTests" , " --exclude-categories=dotty.SlowTests" ).evaluated,
581+ testFromTasty := testOnlyFiltered(" dotty.tools.dotc.FromTastyTests" , " " ).evaluated,
597582
598583 dotr := {
599584 val args : List [String ] = spaceDelimited(" <arg>" ).parsed.toList
@@ -1249,4 +1234,13 @@ object Build {
12491234 case BootstrappedOptimised => commonOptimisedSettings
12501235 })
12511236 }
1237+
1238+ def testOnlyFiltered (test : String , options : String ) = Def .inputTaskDyn {
1239+ val args = spaceDelimited(" <arg>" ).parsed
1240+ val cmd = s " $test -- $options" + {
1241+ if (args.nonEmpty) " -Ddotty.tests.filter=" + args.mkString(" " )
1242+ else " "
1243+ }
1244+ (testOnly in Test ).toTask(cmd)
1245+ }
12521246}
0 commit comments