tap: Exit with failure code only if environment variable is set
This commit is contained in:
parent
0835e52c53
commit
8bff17c6c7
|
|
@ -103,10 +103,10 @@
|
|||
(let ((value (test-result-ref runner key)))
|
||||
(if value (any->string value) "")))))
|
||||
(let* ((failed? (or (equal? result 'fail) (equal? result 'xfail))))
|
||||
(when failed?
|
||||
(set! exit-with-fail? #t)
|
||||
(print "not "))
|
||||
(print "ok " current-test-group-count)
|
||||
(cond (failed?
|
||||
(set! exit-with-fail? #t)
|
||||
(print "not ok " current-test-group-count))
|
||||
(else (print "ok " current-test-group-count)))
|
||||
(if (and (string? name) (not (string=? name "")))
|
||||
(println " - " name)
|
||||
(println ""))
|
||||
|
|
@ -124,6 +124,8 @@
|
|||
(test-runner-on-final!
|
||||
runner
|
||||
(lambda (runner)
|
||||
(when exit-with-fail? (exit 1))))
|
||||
(when (and (get-environment-variable "SCM_TAP_EXIT_FAIL")
|
||||
exit-with-fail?)
|
||||
(exit 1))))
|
||||
|
||||
runner))))
|
||||
|
|
|
|||
Loading…
Reference in New Issue