diff --git a/functional-tests/functional-tests.scm b/functional-tests/functional-tests.scm index 5e04c2e..8b15509 100644 --- a/functional-tests/functional-tests.scm +++ b/functional-tests/functional-tests.scm @@ -222,6 +222,7 @@ (thunk) #t))))) + ;; Returns #t if all tests pass. (define (run-scenarios ss) (let ((pass 0) (fail 0) @@ -250,7 +251,8 @@ (cat (dsp ", ") (num fail) (dsp " failures."))) - nl)))) + nl)) + (zero? fail))) ;;----------------------------------------------- diff --git a/functional-tests/run-functional-tests.scm b/functional-tests/run-functional-tests.scm index 0306034..016e065 100644 --- a/functional-tests/run-functional-tests.scm +++ b/functional-tests/run-functional-tests.scm @@ -5,5 +5,8 @@ (register-thin-tests) (register-cache-tests) -(run-scenarios (list-scenarios)) + +(if (run-scenarios (list-scenarios)) + (exit) + (exit #f))