Function: ert-run-tests
ert-run-tests is a byte-compiled function defined in ert.el.gz.
Signature
(ert-run-tests SELECTOR LISTENER &optional INTERACTIVELY)
Documentation
Run the tests specified by SELECTOR, sending progress updates to LISTENER.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/ert.el.gz
(defun ert-run-tests (selector listener &optional interactively)
"Run the tests specified by SELECTOR, sending progress updates to LISTENER."
(let* ((tests (ert-select-tests selector t))
(stats (ert--make-stats tests selector)))
(setf (ert--stats-start-time stats) (current-time))
(funcall listener 'run-started stats)
(let ((abortedp t))
(unwind-protect
(let ((ert--current-run-stats stats))
(force-mode-line-update)
(unwind-protect
(cl-loop for test in tests do
(ert-run-or-rerun-test stats test listener)
(when (and interactively
(ert-test-quit-p
(ert-test-most-recent-result test))
(y-or-n-p "Abort testing? "))
(cl-return))
finally (setq abortedp nil))
(setf (ert--stats-aborted-p stats) abortedp)
(setf (ert--stats-end-time stats) (current-time))
(funcall listener 'run-ended stats abortedp)))
(force-mode-line-update))
stats)))