mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-07 06:50:23 -08:00
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. |
||
|---|---|---|
| .. | ||
| eieio-tests | ||
| package-resources | ||
| testcover-resources | ||
| benchmark-tests.el | ||
| bytecomp-tests.el | ||
| checkdoc-tests.el | ||
| cl-extra-tests.el | ||
| cl-generic-tests.el | ||
| cl-lib-tests.el | ||
| cl-print-tests.el | ||
| cl-seq-tests.el | ||
| ert-tests.el | ||
| ert-x-tests.el | ||
| generator-tests.el | ||
| let-alist-tests.el | ||
| lisp-mode-tests.el | ||
| lisp-tests.el | ||
| map-tests.el | ||
| nadvice-tests.el | ||
| package-tests.el | ||
| pcase-tests.el | ||
| pp-tests.el | ||
| regexp-opt-tests.el | ||
| ring-tests.el | ||
| rx-tests.el | ||
| seq-tests.el | ||
| subr-x-tests.el | ||
| tabulated-list-test.el | ||
| testcover-tests.el | ||
| thunk-tests.el | ||
| timer-tests.el | ||