summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2024-08-08 21:43:03 +0200
committerUlrich Müller <ulm@gentoo.org>2024-08-08 21:43:03 +0200
commit9ddb9dfc15b5a59904c7c201c0efa1403567089f (patch)
tree151beb7b742537107e1255e887952dd14d9e2bc1 /Makefile
parentHandle ANSI-C quoted strings in environment file (diff)
downloadebuild-mode-9ddb9dfc15b5a59904c7c201c0efa1403567089f.tar.gz
ebuild-mode-9ddb9dfc15b5a59904c7c201c0efa1403567089f.tar.bz2
ebuild-mode-9ddb9dfc15b5a59904c7c201c0efa1403567089f.zip
Add some tests
* test/ebuild-mode-tests.el: * test/glep-mode-tests.el: New files, introducing tests. * ebuild-mode.el (ebuild-mode-collect-and-split): Make it visible at load time for tests. * Makefile (TESTS, BYTECOMPFLAGS): New variables. (check): New target. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index fe4616b..0fb3188 100644
--- a/Makefile
+++ b/Makefile
@@ -6,22 +6,25 @@ 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
DISTFILES = ebuild-mode.el ebuild-mode-keywords.el \
devbook-mode.el gentoo-newsitem-mode.el glep-mode.el \
- ebuild-mode.texi keyword-generation.sh ChangeLog
+ ebuild-mode.texi keyword-generation.sh ChangeLog \
+ $(TESTS)
ELCS = ebuild-mode.elc devbook-mode.elc gentoo-newsitem-mode.elc glep-mode.elc
INFOFILES = ebuild-mode.info
EMACS = emacs
EMACSFLAGS = -batch -q --no-site-file
+BYTECOMPFLAGS = -eval "(add-to-list 'load-path nil)"
-.PHONY: all keywords dist clean
+.PHONY: all keywords check dist clean
all: $(ELCS) $(INFOFILES)
%.elc: %.el
- $(EMACS) $(EMACSFLAGS) -eval "(add-to-list 'load-path nil)" \
+ $(EMACS) $(EMACSFLAGS) $(BYTECOMPFLAGS) \
-f batch-byte-compile $<
%.info: %.texi
@@ -30,6 +33,10 @@ all: $(ELCS) $(INFOFILES)
keywords:
./keyword-generation.sh
+check:
+ $(EMACS) $(EMACSFLAGS) $(BYTECOMPFLAGS) $(patsubst %,-l %,$(TESTS)) \
+ -f ert-run-tests-batch-and-exit
+
dist: $(DISTFILES)
tar -cJf $(P).tar.xz --transform='s%^%$(P)/%' $^
tar -tJvf $(P).tar.xz