From 60529354d9cf7b479605366b103517af44927e02 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sat, 25 Mar 2017 18:17:53 +0000 Subject: [PATCH] src/final.lisp (test-module): By default, just report and count up errors. This makes the whole return value thing more useful. You can still get a backtrace (or enter the debugger or whatever) by setting the new BACKTRACE argument. --- doc/misc.tex | 3 ++- src/final.lisp | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/misc.tex b/doc/misc.tex index e97fcb0..5ef4d1f 100644 --- a/doc/misc.tex +++ b/doc/misc.tex @@ -568,7 +568,8 @@ These symbols are defined in the @!optparse| package. \begin{describe}{var}{*debugout-pathname*} \end{describe} -\begin{describe}{fun}{test-module @ \&key :reason :clear @> @} +\begin{describe}{fun} + {test-module @ \&key :reason :clear :backtrace @> @} \end{describe} \begin{describe}{fun} diff --git a/src/final.lisp b/src/final.lisp index 0528491..8cd42f8 100644 --- a/src/final.lisp +++ b/src/final.lisp @@ -39,7 +39,7 @@ (defvar *debugout-pathname* #p"debugout.c") (export 'test-module) -(defun test-module (path &key reason clear) +(defun test-module (path &key reason clear backtrace) "Read a module from PATH, to exercise the machinery. If CLEAR is non-nil, then reset the translator's state before proceeding. @@ -51,7 +51,8 @@ warnings encountered while processing the module." (when clear (clear-the-decks)) (multiple-value-bind (module nerror nwarning) - (count-and-report-errors () (read-module path)) + (if backtrace (read-module path) + (count-and-report-errors () (read-module path))) (when (and module reason) (with-open-file (out *debugout-pathname* :direction :output -- 2.11.0