emacs/test/lisp/emacs-lisp
Noam Postavsky ead545824e Improve ert backtrace recording
Change ert to use the new `backtrace-frames' function instead of
collecting frames one by one with `backtrace-frame'.  Additionally,
collect frames starting from `signal' instead the somewhat arbitrary
"6 from the bottom".  Skipping 6 frames would skip the expression that
actually caused the signal that triggered the debugger.  Possibly 6
was chosen because in the case of a failed test, the triggering frame
is an `ert-fail' call, which is not so interesting.  But in case of a
test throwing an error, this drops the `error' call which is too much.

* lisp/emacs-lisp/debug.el (debugger-make-xrefs): Remove.
* lisp/emacs-lisp/ert.el (ert--make-xrefs-region): Bring in relevant
code from `debugger-make-xrefs'.
(ert--print-backtrace): Add DO-XREFS parameter, delegate to
`debugger-insert-backtrace'.
(ert--run-test-debugger): Record the backtrace frames starting from
the instigating `signal' call.
(ert-run-tests-batch): Pass nil for `ert--print-backtrace's new
DO-XREFS parameter.
(ert-results-pop-to-backtrace-for-test-at-point): Pass t as DO-XREFS
to `ert--print-backtrace' and remove call to `debugger-make-xrefs'.
* test/lisp/emacs-lisp/ert-tests.el (ert-test-record-backtrace): Check
the backtrace list instead of comparing its string representation.
Expect `signal' to be the first frame.
2017-06-29 19:37:25 -04:00
..
eieio-tests Suppress intermittent test failure on hydra 2017-05-23 20:44:52 -04:00
package-resources Don't use IP 0.0.0.0 for package test server (Bug#22582) 2017-02-25 12:56:09 -05:00
testcover-resources Add tests for lisp/emacs-lisp/testcover.el 2017-02-04 11:43:50 +02:00
benchmark-tests.el Use lexical binding in benchmark.el 2017-03-03 18:26:30 +09:00
bytecomp-tests.el Make `old-style-backquotes' variable internal 2017-05-13 12:32:29 +02:00
checkdoc-tests.el More small authors.el updates 2017-06-06 15:08:41 -04:00
cl-extra-tests.el Prevent for consing in cl-mapc and cl-mapl 2017-02-27 16:32:10 +09:00
cl-generic-tests.el
cl-lib-tests.el * lisp/emacs-lisp/cl-macs.el: Fix symbol-macrolet 2017-04-21 12:12:42 -04:00
cl-print-tests.el cl-print: handle circular objects when `print-circle' is nil (Bug#27117) 2017-05-31 07:45:43 -04:00
cl-seq-tests.el test/*.el: Avoid byte-compiler warnings 2017-01-28 04:40:36 +01:00
ert-tests.el Improve ert backtrace recording 2017-06-29 19:37:25 -04:00
ert-x-tests.el
generator-tests.el
let-alist-tests.el test/*.el: Avoid byte-compiler warnings 2017-01-28 04:40:36 +01:00
lisp-mode-tests.el Fix wrong indentation after string literal (Bug#27306) 2017-06-13 07:19:12 -04:00
lisp-tests.el Fix elisp-tests-with-temp-buffer compilation 2017-05-12 11:40:48 +02:00
map-tests.el
nadvice-tests.el
package-tests.el Update a package test for hydra 2017-04-11 08:42:54 -07:00
pcase-tests.el
pp-tests.el Switch pp.el to lexical binding 2017-03-02 23:03:20 -05:00
regexp-opt-tests.el
ring-tests.el
rx-tests.el
seq-tests.el Add seq-set-equal-p to test for set equality 2017-05-04 11:32:58 +02:00
subr-x-tests.el
tabulated-list-test.el
testcover-tests.el Add tests for lisp/emacs-lisp/testcover.el 2017-02-04 11:43:50 +02:00
thunk-tests.el
timer-tests.el