scala - How to set System property for a scalatest from sbt command line -
a scalatest suite using
system.getproperty("my.command-line.property") what sbt command line achieve setting?
i have tried
sbt_opts="-dmy.command-line.property=foo" sbt "test-only <path test suite" also:
java_opts="-j-dmy.command-line.property=foo" sbt "test-only <path test suite" finally:
sbt/sbt '; set javaoptions in test +="-dtest.num.points=500000"; \ project mllib; test-only org.apache.spark.mllib.optimization.lbfgssuite' when using of attempts system.getproperty comes blank.
an approach does work running scalatest within intellij , setting jvm parameters -dmy.command-line.property=foo within run configuration.
your third way almost works (if fork in test := true set). have change project first:
sbt/sbt '; project mllib; set javaoptions in test +="-dtest.num.points=500000"; \ test-only org.apache.spark.mllib.optimization.lbfgssuite'
Comments
Post a Comment