From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan Nieuwenhuizen Newsgroups: gmane.lisp.guile.devel Subject: [PATCH] test-suite: show backtrace when exception is thrown during test. Date: Sun, 05 Oct 2014 12:16:51 +0200 Organization: AvatarAcademy.nl Message-ID: <87k34eizxo.fsf@drakenvlieg.flower> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1412504237 17842 80.91.229.3 (5 Oct 2014 10:17:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 5 Oct 2014 10:17:17 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Oct 05 12:17:12 2014 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XaisH-00026S-5L for guile-devel@m.gmane.org; Sun, 05 Oct 2014 12:17:09 +0200 Original-Received: from localhost ([::1]:46940 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaisG-0004BL-MV for guile-devel@m.gmane.org; Sun, 05 Oct 2014 06:17:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32991) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xais8-0004Az-0n for guile-devel@gnu.org; Sun, 05 Oct 2014 06:17:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xais3-0001t9-7a for guile-devel@gnu.org; Sun, 05 Oct 2014 06:16:59 -0400 Original-Received: from smtp-vbr6.xs4all.nl ([194.109.24.26]:2558) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xais2-0001t0-UR for guile-devel@gnu.org; Sun, 05 Oct 2014 06:16:55 -0400 Original-Received: from drakenvlieg.flower.peder.onsbrabantnet.nl (static.kpn.net [92.70.116.82] (may be forged)) (authenticated bits=0) by smtp-vbr6.xs4all.nl (8.13.8/8.13.8) with ESMTP id s95AGqTf068119 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 5 Oct 2014 12:16:53 +0200 (CEST) (envelope-from janneke@gnu.org) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Url: http://AvatarAcademy.nl X-Virus-Scanned: by XS4ALL Virus Scanner X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 194.109.24.26 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17544 Archived-At: --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-test-suite-show-backtrace-when-exception-is-thrown-d.patch >From a11e28037d3d5d14d01df38f1dfae6e176bb3dd8 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen 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 * 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 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.nl= =20=20 --=-=-=--