[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] test-suite: show backtrace when exception is thrown during test.
From: |
Jan Nieuwenhuizen |
Subject: |
[PATCH] test-suite: show backtrace when exception is thrown during test. |
Date: |
Sun, 05 Oct 2014 12:16:51 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
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 <address@hidden>
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 <address@hidden>
* 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 <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.nl
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] test-suite: show backtrace when exception is thrown during test.,
Jan Nieuwenhuizen <=