diff --git a/internal/zinc-benchmarks/src/test/scala/xsbt/GlobalBenchmarkSetup.scala b/internal/zinc-benchmarks/src/test/scala/xsbt/GlobalBenchmarkSetup.scala index e7fd23f97..59eecf109 100644 --- a/internal/zinc-benchmarks/src/test/scala/xsbt/GlobalBenchmarkSetup.scala +++ b/internal/zinc-benchmarks/src/test/scala/xsbt/GlobalBenchmarkSetup.scala @@ -14,17 +14,16 @@ package xsbt import java.io.File import xsbt.BenchmarkProjects.{ Scalac, Shapeless } -import scala.util.matching.Regex object GlobalBenchmarkSetup { /** Update this list every time you add a new benchmark. */ val projects = Map("Scalac" -> Scalac, "Shapeless" -> Shapeless) - def runSetup(setupDir: File, pattern: Regex): (Int, String) = { + def runSetup(setupDir: File, pattern: String): (Int, String) = { val projectsPreparation = projects .filterKeys { _.matches(pattern) } - .map { (_, project) => + .map { case (_, project) => val benchmark = new ZincBenchmark(project) project -> benchmark.writeSetup(new File(setupDir, project.repo)) } @@ -50,7 +49,7 @@ object GlobalBenchmarkSetup { fail("Too many arguments. Pass the directory to host project setups.") else { val setupDir = new File(args(0)) - val pattern = args(1).r + val pattern = if (args.length == 1) ".*" else args(1) val (exitCode, status) = runSetup(setupDir, pattern) println(status) println("The benchmark setup has finished.")