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

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -