summaryrefslogtreecommitdiff
path: root/test/Makefile.in
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2021-01-24 21:05:33 +0100
committerAndrea Corallo <akrl@sdf.org>2021-01-24 21:05:33 +0100
commitb8d3ae78c54db7c7bb65d367a80f9be3d8744c48 (patch)
tree982f190d1dd79685c43a9829dd66e6a7cbbd0c67 /test/Makefile.in
parent0ffb3dfaa483b0c5cf1f7f367efcb5e9c041ab53 (diff)
parente5aaa1251cfb9d6d18682a5eda137a2e12ca4213 (diff)
downloademacs-b8d3ae78c54db7c7bb65d367a80f9be3d8744c48.tar.gz
Merge remote-tracking branch 'savannah/master' into native-comp
Diffstat (limited to 'test/Makefile.in')
-rw-r--r--test/Makefile.in20
1 files changed, 13 insertions, 7 deletions
diff --git a/test/Makefile.in b/test/Makefile.in
index 849fbbf474e..bfab95b9381 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -253,11 +253,17 @@ endef
$(foreach test,${TESTS},$(eval $(call test_template,${test})))
-# Get the tests for only a specific directory
-NET_TESTS := $(patsubst %.el,%,$(wildcard lisp/net/*.el))
-LISP_TESTS := $(patsubst %.el,%,$(wildcard lisp/*.el))
-check-net: ${NET_TESTS}
-check-lisp: ${LISP_TESTS}
+## Get the tests for only a specific directory.
+SUBDIRS = $(sort $(shell find lib-src lisp src -type d ! -path "*resources*" -print))
+
+define subdir_template
+ .PHONY: check-$(subst /,-,$(1))
+ check-$(subst /,-,$(1)):
+ @${MAKE} check LOGFILES="$(patsubst %.el,%.log, \
+ $(patsubst $(srcdir)/%,%,$(wildcard $(1)/*.el)))"
+endef
+
+$(foreach subdir, $(SUBDIRS), $(eval $(call subdir_template,$(subdir))))
ifeq (@HAVE_MODULES@, yes)
# -fPIC is a no-op on Windows, but causes a compiler warning
@@ -325,10 +331,10 @@ check-doit:
ifeq ($(TEST_INTERACTIVE), yes)
HOME=$(TEST_HOME) $(emacs) \
-l ert ${ert_opts} \
- $(patsubst %,-l %,$(if $(findstring $(TEST_LOAD_EL),yes),$ELFILES,$(ELFILES:.el=))) \
+ $(patsubst %,-l %,$(if $(findstring $(TEST_LOAD_EL),yes),$ELFILES,$(ELFILES:.el=))) \
$(TEST_RUN_ERT)
else
- -@${MAKE} -k ${LOGFILES}
+ -@${MAKE} -k ${LOGFILES}
@$(emacs) --batch -l ert --eval \
"(ert-summarize-tests-batch-and-exit ${SUMMARIZE_TESTS})" ${LOGFILES}
endif