From 1db7e0604b2b1d090c0be2b52beaa0afe9a2b32d Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 8 May 2008 17:42:37 +0000 Subject: [PATCH] added proper error exit code svn: r9749 --- collects/tests/framework/main.ss | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/collects/tests/framework/main.ss b/collects/tests/framework/main.ss index 0191b3f726..dbe824aafd 100644 --- a/collects/tests/framework/main.ss +++ b/collects/tests/framework/main.ss @@ -103,14 +103,17 @@ (shutdown-listener) -(cond - [(not (null? jumped-out-tests)) - (printf "Test suites ended with exns ~s\n" jumped-out-tests)] - [(null? failed-tests) - (printf "All tests passed.\n")] - [else - (debug-printf schedule "FAILED tests:\n") - (for-each (lambda (failed-test) - (debug-printf schedule " ~a // ~a\n" - (car failed-test) (cdr failed-test))) - failed-tests)]) +(exit (cond + [(not (null? jumped-out-tests)) + (printf "Test suites ended with exns ~s\n" jumped-out-tests) + 1] + [(null? failed-tests) + (printf "All tests passed.\n") + 0] + [else + (debug-printf schedule "FAILED tests:\n") + (for-each (lambda (failed-test) + (debug-printf schedule " ~a // ~a\n" + (car failed-test) (cdr failed-test))) + failed-tests) + 1]))