aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2021-01-22 23:43:00 -0500
committerKyle Meyer <kyle@kyleam.com>2021-01-23 10:17:52 -0500
commitc4d9bdebc98f8ab38790bceba0f33f34a42d4ce0 (patch)
tree019c904998c1ead264b76e45dddc5572ada831f7 /Makefile
parent1934b6872e322ca3d7205b9a2f600832055e3e24 (diff)
downloadpiem-c4d9bdebc98f8ab38790bceba0f33f34a42d4ce0.tar.gz
Add a few basic tests
The more interesting things will involve more work and setup to test, but at least start testing some simple things. This project's Makefile was originally based off of Elfeed's, and the changes from this commit are adapted from there as well. Message-Id: <20210123044300.31326-1-kyle@kyleam.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 6ea8472..a139d1a 100644
--- a/Makefile
+++ b/Makefile
@@ -2,16 +2,21 @@
EMACS = emacs
# Rely on EMACSLOADPATH for everything but the current directory.
-BATCH = $(EMACS) --batch -Q -L .
+BATCH = $(EMACS) --batch -Q -L . -L tests
EL = piem.el piem-b4.el piem-elfeed.el piem-eww.el piem-gnus.el \
- piem-maildir.el piem-notmuch.el
+ piem-maildir.el piem-notmuch.el \
+ tests/piem-tests.el
ELC = $(EL:.el=.elc)
all: compile piem.info piem-autoloads.el
compile: $(ELC)
+check: test
+test: $(ELC)
+ $(BATCH) -l tests/piem-tests.elc -f ert-run-tests-batch
+
piem-autoloads.el: $(EL)
$(BATCH) -l package --eval \
'(package-generate-autoloads "piem" default-directory)'
@@ -31,6 +36,7 @@ piem-gnus.elc: piem-gnus.el piem.elc
piem-maildir.elc: piem-maildir.el
piem-notmuch.elc: piem-notmuch.el piem.elc
piem.elc: piem.el piem-maildir.elc
+tests/piem-tests.elc: tests/piem-tests.el piem.elc
.SUFFIXES: .el .elc .texi .info .html