aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp
diff options
context:
space:
mode:
authorNoam Postavsky2017-11-30 20:51:07 -0500
committerNoam Postavsky2017-12-03 15:39:02 -0500
commitcfa50d30f2876ca30158082e9a91d19e804a7e09 (patch)
treeabca833b43f9194d6fa0c8fb0410db91da768d7f /test/lisp
parent6e0008890ffcfdcd0a8fc827c7108907bfb25d0a (diff)
downloademacs-cfa50d30f2876ca30158082e9a91d19e804a7e09.tar.gz
emacs-cfa50d30f2876ca30158082e9a91d19e804a7e09.zip
; Tracing for eieio-test random failure (Bug#24503)
* test/Makefile.in [EMACS_HYDRA_CI]: Always show log for eieio-tests. * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (top-level): Trace cl-generic functions. (eieio-test-dump-trace): New function. (eieio-test-37-obsolete-name-in-constructor): Use it.
Diffstat (limited to 'test/lisp')
-rw-r--r--test/lisp/emacs-lisp/eieio-tests/eieio-tests.el22
1 files changed, 20 insertions, 2 deletions
diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
index fbdb9896a40..454f2aaca0e 100644
--- a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
+++ b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
@@ -887,15 +887,33 @@ Subclasses to override slot attributes.")
887 (should (= (length (eieio-build-class-alist 'opt-test1 nil)) 2)) 887 (should (= (length (eieio-build-class-alist 'opt-test1 nil)) 2))
888 (should (= (length (eieio-build-class-alist 'opt-test1 t)) 1))) 888 (should (= (length (eieio-build-class-alist 'opt-test1 t)) 1)))
889 889
890(mapatoms (lambda (a)
891 (when (and (fboundp a)
892 (string-match "\\`cl--?generic"
893 (symbol-name a)))
894 (trace-function-background a))))
895
890(defclass eieio--testing () ()) 896(defclass eieio--testing () ())
891 897
892(defmethod constructor :static ((_x eieio--testing) newname &rest _args) 898(defmethod constructor :static ((_x eieio--testing) newname &rest _args)
893 (list newname 2)) 899 (list newname 2))
894 900
901(defun eieio-test-dump-trace ()
902 (message "%s" (with-current-buffer "*trace-output*"
903 (goto-char (point-min))
904 (while (re-search-forward "[\0-\010\013-\037]" nil t)
905 (insert (prog1 (format "\\%03o" (char-before))
906 (delete-char -1))))
907 (buffer-string))))
908(eieio-test-dump-trace)
909
895(ert-deftest eieio-test-37-obsolete-name-in-constructor () 910(ert-deftest eieio-test-37-obsolete-name-in-constructor ()
896 ;; FIXME repeated intermittent failures on hydra (bug#24503) 911 ;; FIXME repeated intermittent failures on hydra (bug#24503)
897 (skip-unless (not (getenv "EMACS_HYDRA_CI"))) 912 (with-current-buffer "*trace-output*"
898 (should (equal (eieio--testing "toto") '("toto" 2)))) 913 (erase-buffer))
914 (unwind-protect
915 (should (equal (eieio--testing "toto") '("toto" 2)))
916 (eieio-test-dump-trace)))
899 917
900(ert-deftest eieio-autoload () 918(ert-deftest eieio-autoload ()
901 "Tests to see whether reftex-auc has been autoloaded" 919 "Tests to see whether reftex-auc has been autoloaded"