Commit 992e37c7 authored by Robert Goldman's avatar Robert Goldman

Allow user to disable backtraces.

In some cases the backtraces aren't useful, and obscure more important
information.  Now the user can disable them with lisp variable or
environment variable.

(cherry picked from commit 99422ff9238f72fbad557e8d716bee9df2e84d7c)
parent e0d51572
......@@ -55,6 +55,8 @@ Some constraints:
))
(defvar *debug-asdf* nil)
(defvar *print-backtrace* t)
(defvar *quit-when-done* t)
(defun verbose (&optional (verbose t) (print verbose))
......@@ -403,10 +405,11 @@ is bound, write a message and exit on an error. If
(format *error-output* "~&TEST ABORTED: ~A~&" c))
(finish-outputs*)
(unless *debug-asdf*
(ignore-errors
(format *error-output* "~&Backtrace:~%")
(acall :print-condition-backtrace
c :count 69 :stream *error-output*))
(when *print-backtrace*
(ignore-errors
(format *error-output* "~&Backtrace:~%")
(acall :print-condition-backtrace
c :count 69 :stream *error-output*)))
(leave-test "Script failed" 1)))))
(funcall thunk)
(leave-test "Script succeeded" 0)))))
......@@ -613,7 +616,8 @@ is bound, write a message and exit on an error. If
(format t "Configuring ASDF~%")
(when (asym :getenvp)
(format t "Enabling debugging~%")
(setf *debug-asdf* (or *debug-asdf* (acall :getenvp "DEBUG_ASDF_TEST"))))
(setf *debug-asdf* (or *debug-asdf* (acall :getenvp "DEBUG_ASDF_TEST")))
(setf *print-backtrace* (not (acall :getenvp "NO_ASDF_BACKTRACE"))))
(when *trace-symbols*
(format t "Tracing~{ ~A~}~%" *trace-symbols*)
(eval `(trace ,@(loop :for s :in *trace-symbols* :collect (asym s)))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment