continuous integration - SpecRun returning exit code 120 with @ignore tests -


running specrun command line part of continuous integration setup, , ignored (@ignore) test generated exit code of 120 when specrun completed.

currently, break build on exit code not equal 0 (universal success indicator!).

what exit code 120 mean exactly? "a test ignored"? or imply more?

what other values returned?

sample build output below. collect exit codes (currently 1 specrun task, 1 exit code collected), , print out "exit codes"

58>  done. 58>  result: tests passed (5 ignored) 58>    total: 478 58>    succeeded: 473 58>    ignored: 5 58>    pending: 0 58>    skipped: 0 58>    failed: 0 58>   58>    execution time: 00:00:42.4550000 58> 58>  exit codes 120 58> 58>build failed. 58> 58>time elapsed 00:00:44.21 ========== rebuild all: 57 succeeded, 1 failed, 0 skipped ========== 

i found list of error codes in forum: https://groups.google.com/forum/?fromgroups=#!topic/specrun/vpq7z2kpkbs

after ordering list error code get:

unknown = 0, succeeded = 110, ignored = 120, pending = 210  nothingtorun = 310, skipped = 320, inconclusive = 410, cleanupfailed = 420, randomlyfailed = 430, failed = 440, initializationfailed = 450, frameworkerror = 510, configurationerror = 520, 

based on list use following command line script on build server execute tests:

specrun.exe [...]  if errorlevel 200 exit /b %errorlevel%  exit /b 0 

we use exit command return error code. higher error level codes (>= 200) return error code break build. however, error codes below limit treated success , return 0.

using limit (200) succeeded , ignored cases treated successful , else breaks build. if want allow pending tests (210) can check higher error code in if.


Comments