Hi, I found that when code under test throws an exception, it is hidden from the user. The test suite niftily uses exceptions for message passing, I wonder if this is wise (in-band signaling?).
Anyway, if an unexpected exception occurs I find it helpful to see the backtrace. See attached patch. Greetings, Jan
>From a11e28037d3d5d14d01df38f1dfae6e176bb3dd8 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen <jann...@gnu.org> Date: Sun, 5 Oct 2014 11:42:09 +0200 Subject: [PATCH] test-suite: show backtrace when exception is thrown during test. 2014-10-05 Jan Nieuwenhuizen <jann...@gnu.org> * test-suite/test-suite/lib.scm (run-test): Show backtrace for unexpected, i.e., non test-result carrying exceptions. --- test-suite/test-suite/lib.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test-suite/test-suite/lib.scm b/test-suite/test-suite/lib.scm index 7bd3260..b17e910 100644 --- a/test-suite/test-suite/lib.scm +++ b/test-suite/test-suite/lib.scm @@ -345,7 +345,8 @@ (report 'unresolved test-name location) (quit)) (else - (report 'error test-name location (cons key args)))))) + (report 'error test-name location (cons key args)) + (backtrace))))) (set! test-running #f))))) ;;; A short form for tests that are expected to pass, taken from Greg. -- /home/janneke/.signature
-- Jan Nieuwenhuizen <jann...@gnu.org> | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.nl