scala - SBT: execute task using other task value -


i redefine tests supply arguments configuration test suite:

this excerpt build.scala:

object build extends build {   lazy val myproject = (project in file("my_project")).settings(     test in test := myprojecttest.value   )    val myprojecttest = def.task {     (testonly in test).totask(" tests.suites -- " +       s"-ddbserver=localhost " +       s"-ddbport=3306 ").value   } } 

this works ok.

now, wanted give test suite name of artifact this:

val myprojecttest = def.task {   val art = (keys.artifactpath in (compile, packagebin)).value    (testonly in test).totask(" tests.suites -- " +     s"-dartifact=${art.getcanonicalpath} " +     s"-ddbserver=localhost " +     s"-ddbport=3306").value } 

but shows following error message:

[error] /tmp/aa/project/build.scala:17: illegal dynamic reference: art [error]     s"-dartifact=${art.getcanonicalpath} " + [error]                    ^ [error] 1 error found [error] (compile:compileincremental) compilation failed 

i know something sbt internals, macros, task dependency graph, , managed solve of tasks using scopes. here tried use map or flatmap on (keys.artifactpath in (compile, packagebin)) cannot achieve desirted result. whenever try access .value illegal dynamic reference.

please, guide me. need pass value of task other task (inputkey) parameters.

sbt version: 0.13.5

i've never seen specifying test options via .totask.

do want see if testoptions in test works you? see options section of testing docs.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -