# HG changeset patch # User Ben Wing # Date 1267931599 21600 # Node ID b24cf478a45ebafca87d17ff01515ec98d446d15 # Parent c113da3e2f6749f20e38325531968a0c456be6f0 make test backtraces smaller -------------------- ChangeLog entries follow: -------------------- lisp/ChangeLog addition: 2010-03-06 Ben Wing * test-harness.el: * test-harness.el (test-harness-backtrace): New. * test-harness.el (test-harness-assertion-failure-do-debug): * test-harness.el (test-harness-unexpected-error-do-debug): Use the print settings from edebug.el to make backtraces not be so huge. diff -r c113da3e2f67 -r b24cf478a45e lisp/ChangeLog --- a/lisp/ChangeLog Sat Mar 06 00:44:13 2010 -0600 +++ b/lisp/ChangeLog Sat Mar 06 21:13:19 2010 -0600 @@ -1,3 +1,12 @@ +2010-03-06 Ben Wing + + * test-harness.el: + * test-harness.el (test-harness-backtrace): New. + * test-harness.el (test-harness-assertion-failure-do-debug): + * test-harness.el (test-harness-unexpected-error-do-debug): + Use the print settings from edebug.el to make backtraces not + be so huge. + 2010-03-05 Aidan Kehoe * cl-macs.el (delete-duplicates): diff -r c113da3e2f67 -r b24cf478a45e lisp/test-harness.el --- a/lisp/test-harness.el Sat Mar 06 00:44:13 2010 -0600 +++ b/lisp/test-harness.el Sat Mar 06 21:13:19 2010 -0600 @@ -194,6 +194,12 @@ (kill-buffer input-buffer) )) +(defsubst test-harness-backtrace () + "Display a reasonable-size backtrace." + (let ((print-escape-newlines t) + (print-length 50)) + (backtrace nil t))) + (defsubst test-harness-assertion-failure-do-debug (error-info) "Maybe enter debugger or display a backtrace on assertion failure. ERROR-INFO is a cons of the args (SIG . DATA) that were passed to `signal'. @@ -206,7 +212,7 @@ test-harness-assertion-failure-enter-debugger) (funcall debugger 'error error-info)) (test-harness-assertion-failure-show-backtrace - (backtrace nil t))))) + (test-harness-backtrace))))) (defsubst test-harness-unexpected-error-do-debug (error-info) "Maybe enter debugger or display a backtrace on unexpected error. @@ -220,7 +226,7 @@ test-harness-unexpected-error-enter-debugger) (funcall debugger 'error error-info)) (test-harness-unexpected-error-show-backtrace - (backtrace nil t))))) + (test-harness-backtrace))))) (defsubst test-harness-unexpected-error-condition-handler (error-info context-msg) "Condition handler for when unexpected errors occur.