mardi 29 mars 2016

Ruby minitest and exit status

Working on a ruby minitest script on linux, every time it found any "failure" or "error" (in the test, not the running script) the ruby script itself returns 1 as exit status in bash

output follows:

$ ruby test.rb; echo $?

Run options: --seed 30930

Running: ...

...F....

Finished in... 8 runs, 9 assertions, 1 failures, 0 errors, 0 skips

generating ci files

1

The problem is, as I'm triggering the tests from Fabric, it may exit every time each test find an error or failure. Is it an expected behaviour I should expect for the test? or is something wrong there with the exit status? (if the script ends with no error, nor failures, it exits 0)

I would like to run fabric without env.warn_only = True to mark tests as failed if the test script may be broken.

Is there a way to the test to not change the exit status when failed (but succeed in running)? Is that an expected test way and I have to adjust my fabric script?

Thanks!

Aucun commentaire:

Enregistrer un commentaire