changeset 5110:b24cf478a45e

make test backtraces smaller -------------------- ChangeLog entries follow: -------------------- lisp/ChangeLog addition: 2010-03-06 Ben Wing <ben@xemacs.org> * 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.
author Ben Wing <ben@xemacs.org>
date Sat, 06 Mar 2010 21:13:19 -0600
parents c113da3e2f67
children 34b22f7e1815
files lisp/ChangeLog lisp/test-harness.el
diffstat 2 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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  <ben@xemacs.org>
+
+	* 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  <kehoea@parhasard.net>
 
 	* cl-macs.el (delete-duplicates):
--- 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.