Open rich-nguyen opened 8 years ago
Generally for this, we need the test task to fail (with an exception), which should correct @rich-nguyen's problem above, and a related of problem of mine, which is we need the sbt test
command to fail with a exit code of 1
, to fail the build in teamcity (we run it as part of a shell script).
I've found that the plugin explicitly disables failing the test task with an exception by overwriting the testResultLogger
in the test task in 6c39634d256b681fea03bbd1ab3fe0dad34da0b2. Why is this explicitly disabled? /cc @shkate
As a workaround, I've found that setting the testResultLogger
back to the default, causes the test task to fail as expected:
testResultLogger in (Test, test) := TestResultLogger.Default
I wrote a small sbt task that takes the result of the
test
task and checks for incomplete, something like this:In team city, if I ssh on to an agent and run this sbt task manually, the result is "Tests Failed". But if i run the same task through the team city runner, I get "Tests Passed".