diff options
author | Ludovic Courtès <ludo@gnu.org> | 2010-05-30 22:56:17 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2010-05-30 22:56:17 +0200 |
commit | 8b8ce935ed6e9d15e260ddbf52c2b29822108f2e (patch) | |
tree | 929d8553e45d1928a5d5d35674f30749f4103b27 | |
parent | 86425e26539fc1ffc145f74730c846cb724179a6 (diff) | |
download | guile-8b8ce935ed6e9d15e260ddbf52c2b29822108f2e.tar.gz |
Have `test-ffi' run all the tests even after a failure.
* test-suite/standalone/test-ffi (failed?): New variable.
(test): Set `failed?' to #t upon error and display an error message.
Have the exit code depend on FAILED?.
-rwxr-xr-x | test-suite/standalone/test-ffi | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test-suite/standalone/test-ffi b/test-suite/standalone/test-ffi index 19c1c1567..debe4e112 100755 --- a/test-suite/standalone/test-ffi +++ b/test-suite/standalone/test-ffi @@ -8,13 +8,19 @@ exec guile -q -s "$0" "$@" (define lib (dynamic-link (string-append (getenv "builddir") "/libtest-ffi"))) +(define failed? #f) + (define-syntax test (syntax-rules () ((_ exp res) (let ((expected res) (actual exp)) (if (not (equal? actual expected)) - (error "Bad return from expression" 'exp actual expected)))))) + (begin + (set! failed? #t) + (format (current-error-port) + "bad return from expression `~a': expected ~A; got ~A~%" + 'exp expected actual))))))) ;;; ;;; No args @@ -194,6 +200,8 @@ exec guile -q -s "$0" "$@" (str (utf8->string bv))) (test #t (not (not (string-contains str "file"))))) +(exit (not failed?)) + ;; Local Variables: ;; mode: scheme -;; End:
\ No newline at end of file +;; End: |