Skip to content

Commit d6e3a63

Browse files
committed
Make sbt version configurable
This enables benchmarking of, for example, SBT 1.0.0-M6.
1 parent 51352a0 commit d6e3a63

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compilation/src/main/scala/scala/tools/nsc/HotSbtBenchmark.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ class HotSbtBenchmark {
2525
@Param(value = Array(""))
2626
var extraArgs: String = _
2727

28+
@Param(value = Array("0.13.15"))
29+
var sbtVersion: String = _
30+
2831
// This parameter is set by ScalacBenchmarkRunner / UploadingRunner based on the Scala version.
2932
// When running the benchmark directly the "latest" symlink is used.
3033
@Param(value = Array("latest"))
@@ -60,7 +63,7 @@ class HotSbtBenchmark {
6063
scalaHome = Files.createTempDirectory("scalaHome-")
6164
initDepsClasspath()
6265
Files.createDirectory(tempDir.resolve("project"))
63-
Files.write(tempDir.resolve("project/build.properties"), java.util.Arrays.asList("sbt.version=0.13.15"))
66+
Files.write(tempDir.resolve("project/build.properties"), java.util.Arrays.asList("sbt.version=" + sbtVersion))
6467
Files.write(tempDir.resolve("build.sbt"), buildDef.getBytes("UTF-8"))
6568
val sbtLaucherPath = System.getProperty("sbt.launcher")
6669
if (sbtLaucherPath == null) sys.error("System property -Dsbt.launcher absent")

0 commit comments

Comments
 (0)