@@ -577,23 +577,8 @@ object Build {
577
577
jarOpts ::: tuning ::: agentOptions ::: ci_build ::: path.toList
578
578
},
579
579
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 := testOnly(" dotty.tools.dotc.CompilationTests" , " --exclude-categories=dotty.SlowTests" ).evaluated,
581
+ testFromTasty := testOnly(" dotty.tools.dotc.FromTastyTests" , " " ).evaluated,
597
582
598
583
dotr := {
599
584
val args : List [String ] = spaceDelimited(" <arg>" ).parsed.toList
@@ -1249,4 +1234,13 @@ object Build {
1249
1234
case BootstrappedOptimised => commonOptimisedSettings
1250
1235
})
1251
1236
}
1237
+
1238
+ def testOnly (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
+ }
1252
1246
}
0 commit comments