]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix ert errors when there's a test that binds `debug-on-error'
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 11 Oct 2021 09:14:26 +0000 (11:14 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 11 Oct 2021 09:14:26 +0000 (11:14 +0200)
* lisp/emacs-lisp/ert.el (ert--run-test-internal): Don't infloop
on errors when signalling errors (bug#51131).

lisp/emacs-lisp/ert.el

index 98cb1fd1cf6ee42a36dad87c057109fde591e705..b7d984374cb62c67b643881cf42edf0843ae7d8a 100644 (file)
@@ -783,6 +783,10 @@ This mainly sets up debugger-related bindings."
                           (ert--run-test-debugger test-execution-info
                                                   args)))
               (debug-on-error t)
+              ;; Don't infloop if the error being called is erroring
+              ;; out, and we have `debug-on-error' bound to nil inside
+              ;; the test.
+              (backtrace-on-error-noninteractive nil)
               (debug-on-quit t)
               ;; FIXME: Do we need to store the old binding of this
               ;; and consider it in `ert--run-test-debugger'?