mercredi 22 juin 2016

Passing command line argument to sbt test

In sbt run config can be passed easily, for example as:

sbt "run -Dlib.lib1.version=2.0.0" 

But a similar thing fails when arguments are passed to sbt test. For example:

sbt "test -Dlib.lib1.version=2.0.0"

Official document states that sbt test doesn't support command line argument: "The test task accepts no command line arguments and runs all tests". I want to run test with different version of a library, the version is kept as a variable in the reference.conf, and I want to override this variable during test without changing the reference.conf each time.

So, how can I pass the config using command line argument to sbt test ?

Aucun commentaire:

Enregistrer un commentaire