diff options
author | Ulrich Müller <ulm@gentoo.org> | 2024-08-26 18:18:18 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2024-08-27 23:23:33 +0200 |
commit | 4b112c7431b742c02a8bc3f246e687bf781b7781 (patch) | |
tree | 27dc58344c4b53258ec97e4f335cf04506c69d5e | |
parent | Specify indentation for static-if (diff) | |
download | ebuild-mode-4b112c7431b742c02a8bc3f246e687bf781b7781.tar.gz ebuild-mode-4b112c7431b742c02a8bc3f246e687bf781b7781.tar.bz2 ebuild-mode-4b112c7431b742c02a8bc3f246e687bf781b7781.zip |
Return a useful exit status for XEmacs tests
* test/xemacs-test-wrapper.el (kill-emacs): Return a useful exit
status.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | test/xemacs-test-wrapper.el | 12 |
2 files changed, 17 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2024-08-26 Ulrich Müller <ulm@gentoo.org> + + * test/xemacs-test-wrapper.el (kill-emacs): Return a useful exit + status. + 2024-08-22 Ulrich Müller <ulm@gentoo.org> * test/ebuild-mode-tests.el (cl-letf, cl-letf*) diff --git a/test/xemacs-test-wrapper.el b/test/xemacs-test-wrapper.el index dd83a07..930d7ff 100644 --- a/test/xemacs-test-wrapper.el +++ b/test/xemacs-test-wrapper.el @@ -31,3 +31,15 @@ (defmacro should-error (form) `(Check-Error 'error ,form)) + +;; return a useful exit status +(defadvice kill-emacs (before xemacs-test-wrapper-kill-emacs activate) + (let ((ret (ad-get-arg 0))) + (cond ((and (integerp ret) (>= ret 2))) + ((/= unexpected-test-suite-failures 0) + (setq ret 2)) + (t (dolist (result test-harness-file-results-alist) + ;; result is a list: (file passes total) + (if (/= (nth 1 result) (nth 2 result)) + (setq ret 1))))) + (ad-set-arg 0 ret))) |