portable-scala/sbt-crossproject

Benchmarks do not run under cross project.

Kesanov opened this issue · 1 comments

My benchmark task sbt project/bench stop working under cross project. It succeeds but does not execute any benchmark tests.

My build.sbt:

lazy val Benchmark = config("bench") extend sbt.Test

lazy val project= crossProject(JVMPlatform)
  .withoutSuffixFor(JVMPlatform)
  .crossType(CrossType.Pure)
  .in(file("project"))
  .configs(Test)
  .configs(Benchmark)
  .jvmSettings(
    inConfig(Benchmark)(Defaults.testSettings),
    bench := {
      (test in Benchmark).tag(Exclusive).value
    },
    testFrameworks += new TestFramework("org.scalameter.ScalaMeterFramework"),
    libraryDependencies += "com.storm-enroute" %% "scalameter" % "0.17" % "bench",
  )
sjrd commented

This looks like a misconfiguration to me rather than a bug. You should probably add something like

unmanagedSourceDirectories in Benchmark +=
  baseDirectory.value.getParentFile / "src/benchmark/scala"

to your jvmSettings, or something like that.


The GitHub Issues in this repo are for bug reports and feature requests only. Please ask questions on StackOverflow or on Gitter, where more than just the core developers can see and answer.

Thank you for your understanding.