unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#58941: 28.1.90; ERT tests and backtraces
@ 2022-11-01  6:04 Ihor Radchenko
  2022-11-01  7:24 ` Gerd Möllmann
  0 siblings, 1 reply; 5+ messages in thread
From: Ihor Radchenko @ 2022-11-01  6:04 UTC (permalink / raw)
  To: 58941

Hi,

Currently, when one runs tests and error is thrown inside `should'
forms, no meaningful backtrace is being produced.

This is because `should' wraps the code into `condition-case' that
truncates the backtraces.

Would it be possible to allow more informative backtraces in failed ERT
tests?

An example of useless backtrace can be found in
https://builds.sr.ht/~bzg/job/872738:

Test test-ob-scheme/unspecified backtrace:
  signal(void-function (p))
  apply(signal (void-function (p)))
  (setq value-1494 (apply fn-1492 args-1493))
  (unwind-protect (setq value-1494 (apply fn-1492 args-1493)) (setq fo
  (if (unwind-protect (setq value-1494 (apply fn-1492 args-1493)) (set
  (let (form-description-1496) (if (unwind-protect (setq value-1494 (a
  (let ((value-1494 (quote ert-form-evaluation-aborted-1495))) (let (f
  (let* ((fn-1492 (function equal)) (args-1493 (condition-case err (le
  (closure (t) nil (let* ((fn-1492 (function equal)) (args-1493 (condi
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name test-ob-scheme/unspecified :documenta
  ert-run-or-rerun-test(#s(ert--stats :selector "\\(org\\|ob\\|ox\\)" 
  ert-run-tests("\\(org\\|ob\\|ox\\)" #f(compiled-function (event-type
  ert-run-tests-batch("\\(org\\|ob\\|ox\\)")
  ert-run-tests-batch-and-exit("\\(org\\|ob\\|ox\\)")
  (let ((org-id-track-globally t) (org-test-selector (if org-test-sele
  org-test-run-batch-tests("\\(org\\|ob\\|ox\\)")
  eval((org-test-run-batch-tests org-test-select-re))
  command-line-1(("--load" "/home/build/.emacs.d/init.el" "--eval" "(s
  command-line()
  normal-top-level()
Test test-ob-scheme/unspecified condition:
    (void-function p)
   FAILED   236/1034  test-ob-scheme/unspecified

The real backtrace there is

  p(nil)
  geiser-repl-project-root()
  geiser-repl-buffer-name(guile)
  geiser-repl--to-repl-buffer(guile)
  geiser-repl--start-repl(guile nil)
  geiser(guile)
  org-babel-scheme-get-repl(guile nil)
  org-babel-scheme-execute-with-geiser("'(1 2 3)" nil guile nil)
  org-babel-execute:scheme("'(1 2 3)" ((:colname-names) (:rowname-name
  org-babel-execute-src-block(nil)
  org-babel-execute-src-block-maybe()
  org-babel-execute-maybe()

      
-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-01  9:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-01  6:04 bug#58941: 28.1.90; ERT tests and backtraces Ihor Radchenko
2022-11-01  7:24 ` Gerd Möllmann
2022-11-01  8:31   ` Ihor Radchenko
2022-11-01  8:38     ` Gerd Möllmann
2022-11-01  9:59   ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).