diff options
author | Ulrich Müller <ulm@gentoo.org> | 2024-08-22 21:54:53 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2024-08-27 23:23:33 +0200 |
commit | f5b0f9924b524a58da66c9039cc8048fdd6ec30f (patch) | |
tree | b225afe4081636a03bf9779f9e410c4a198ae9c3 /Makefile | |
parent | Activate ebuild-repo-mode-menu in XEmacs (diff) | |
download | ebuild-mode-f5b0f9924b524a58da66c9039cc8048fdd6ec30f.tar.gz ebuild-mode-f5b0f9924b524a58da66c9039cc8048fdd6ec30f.tar.bz2 ebuild-mode-f5b0f9924b524a58da66c9039cc8048fdd6ec30f.zip |
Make the tests work with XEmacs
* test/ebuild-mode-tests.el (cl-letf, cl-letf*)
(ebuild-mode-test-run-with-fixed-time)
(ebuild-mode-test-run-silently, ebuild-mode-test-font-lock)
(ebuild-mode-test-unescape-string): Portability fixes for XEmacs.
* test/glep-mode-tests.el (glep-mode-test-run-with-fixed-time):
Sync from ebuild-mode-test-run-with-fixed-time.
* test/xemacs-test-wrapper.el: New file.
* Makefile (DISTFILES): Add xemacs-test-wrapper.el.
(ELCS, TESTS): Include only files that are actually supported by
the Emacs version.
(check): Make it work with XEmacs.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 25 |
1 files changed, 18 insertions, 7 deletions
@@ -6,18 +6,23 @@ PV = $(shell sed '/^;.*[Vv]ersion/!d;s/[^0-9.]*\([^ \t]*\).*/\1/;q' \ ebuild-mode.el) P = $(PN)-$(PV) -TESTS = test/ebuild-mode-tests.el test/glep-mode-tests.el +EMACS = emacs +EMACSFLAGS = -batch -q --no-site-file +BYTECOMPFLAGS = -eval "(add-to-list 'load-path nil)" + DISTFILES = ebuild-mode.el ebuild-mode-keywords.el devbook-mode.el \ gentoo-newsitem-mode.el glep-mode.el ebuild-mode.texi \ ChangeLog Makefile keyword-generation.sh \ - $(TESTS) + test/ebuild-mode-tests.el test/glep-mode-tests.el \ + test/xemacs-test-wrapper.el -ELCS = ebuild-mode.elc devbook-mode.elc gentoo-newsitem-mode.elc glep-mode.elc +ELCS = ebuild-mode.elc gentoo-newsitem-mode.elc +TESTS = test/ebuild-mode-tests.el INFOFILES = ebuild-mode.info - -EMACS = emacs -EMACSFLAGS = -batch -q --no-site-file -BYTECOMPFLAGS = -eval "(add-to-list 'load-path nil)" +ifeq ($(findstring xemacs,$(EMACS)),) + ELCS += devbook-mode.elc glep-mode.elc + TESTS += test/glep-mode-tests.el +endif .PHONY: all keywords check dist clean @@ -34,8 +39,14 @@ keywords: ./keyword-generation.sh check: +ifeq ($(findstring xemacs,$(EMACS)),) $(EMACS) $(EMACSFLAGS) $(BYTECOMPFLAGS) $(patsubst %,-l %,$(TESTS)) \ -f ert-run-tests-batch-and-exit +else + $(EMACS) $(EMACSFLAGS) $(BYTECOMPFLAGS) \ + -eval "(add-to-list 'load-path \"test\")" \ + -l xemacs-test-wrapper -f batch-test-emacs $(TESTS) +endif dist: $(DISTFILES) tar -cJf $(P).tar.xz --transform='s%^%$(P)/%' $^ |