Skip to content
Snippets Groups Projects
Commit b0f468c0 authored by Robert Goldman's avatar Robert Goldman Committed by Francois-Rene Rideau
Browse files

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 657cb0e0
No related branches found
No related tags found
No related merge requests found
...@@ -55,6 +55,8 @@ Some constraints: ...@@ -55,6 +55,8 @@ Some constraints:
)) ))
(defvar *debug-asdf* nil) (defvar *debug-asdf* nil)
(defvar *print-backtrace* t)
(defvar *quit-when-done* t) (defvar *quit-when-done* t)
(defun verbose (&optional (verbose t) (print verbose)) (defun verbose (&optional (verbose t) (print verbose))
...@@ -403,10 +405,11 @@ is bound, write a message and exit on an error. If ...@@ -403,10 +405,11 @@ is bound, write a message and exit on an error. If
(format *error-output* "~&TEST ABORTED: ~A~&" c)) (format *error-output* "~&TEST ABORTED: ~A~&" c))
(finish-outputs*) (finish-outputs*)
(unless *debug-asdf* (unless *debug-asdf*
(ignore-errors (when *print-backtrace*
(format *error-output* "~&Backtrace:~%") (ignore-errors
(acall :print-condition-backtrace (format *error-output* "~&Backtrace:~%")
c :count 69 :stream *error-output*)) (acall :print-condition-backtrace
c :count 69 :stream *error-output*)))
(leave-test "Script failed" 1))))) (leave-test "Script failed" 1)))))
(funcall thunk) (funcall thunk)
(leave-test "Script succeeded" 0))))) (leave-test "Script succeeded" 0)))))
...@@ -613,7 +616,8 @@ is bound, write a message and exit on an error. If ...@@ -613,7 +616,8 @@ is bound, write a message and exit on an error. If
(format t "Configuring ASDF~%") (format t "Configuring ASDF~%")
(when (asym :getenvp) (when (asym :getenvp)
(format t "Enabling debugging~%") (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* (when *trace-symbols*
(format t "Tracing~{ ~A~}~%" *trace-symbols*) (format t "Tracing~{ ~A~}~%" *trace-symbols*)
(eval `(trace ,@(loop :for s :in *trace-symbols* :collect (asym s))))) (eval `(trace ,@(loop :for s :in *trace-symbols* :collect (asym s)))))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment