aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 20 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 98927bc..a08ddb5 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@
# (https://git.cjennings.net/dotfiles.git). Run them from there:
# cd ~/.dotfiles && make stow|restow|reset|unstow|import <de>
-.PHONY: help deps test-unit test test-keep test-vm-base test-maint package-diff
+.PHONY: help deps test-unit test-elisp test test-keep test-vm-base test-maint package-diff
# Filesystem profile for the VM harness: btrfs (default) or zfs. Selects the
# base image the scripts build/use; exported so create-base-vm.sh + run-test.sh
@@ -24,7 +24,8 @@ help:
@echo ""
@echo "Targets:"
@echo " deps Install VM-testing dependencies"
- @echo " test-unit Run fast unit tests for installer helpers (no VM)"
+ @echo " test-unit Run fast unit tests (python + elisp, no VM)"
+ @echo " test-elisp Run just the elisp (ERT) suites"
@echo " test Run full VM test suite (creates base VM if needed)"
@echo " test-keep Run test and keep VM running for manual testing"
@echo " test-vm-base Create base VM only (runs archangel)"
@@ -51,6 +52,8 @@ deps:
# Run the fast unit-test suites for installer helpers (no VM needed).
# One suite per tests/<name>/ dir; `unittest discover` can't find them
# because the dir names are hyphenated, so each suite is run explicitly.
+# Elisp suites (tests/*/test-*.el, ERT) run in the same pass so one green
+# `make test-unit` covers the whole fast tier.
test-unit:
@fail=0; \
for t in tests/*/test_*.py; do \
@@ -58,6 +61,21 @@ test-unit:
echo "==> $$mod"; \
python3 -m unittest "$$mod" || fail=1; \
done; \
+ for t in tests/*/test-*.el; do \
+ [ -e "$$t" ] || continue; \
+ echo "==> $$t"; \
+ emacs --batch -l ert -l "$$t" -f ert-run-tests-batch-and-exit || fail=1; \
+ done; \
+ exit $$fail
+
+# Run just the elisp (ERT) suites
+test-elisp:
+ @fail=0; \
+ for t in tests/*/test-*.el; do \
+ [ -e "$$t" ] || continue; \
+ echo "==> $$t"; \
+ emacs --batch -l ert -l "$$t" -f ert-run-tests-batch-and-exit || fail=1; \
+ done; \
exit $$fail
# Create base VM for testing (runs archangel only, no archsetup)