aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhillip Lord2016-01-15 22:11:39 +0000
committerPhillip Lord2016-01-15 22:11:39 +0000
commit549a765efeca2748e68a5c6ce6c9238784e82535 (patch)
tree368096e2fb9b3c1d413f86088d292087fb73acd0
parentdadb841a06aa1ffd6d17c04ef83140dbd1ad7307 (diff)
downloademacs-549a765efeca2748e68a5c6ce6c9238784e82535.tar.gz
emacs-549a765efeca2748e68a5c6ce6c9238784e82535.zip
Enable test selector from command line
* test/automated/Makefile.in: Change variable manipulation to avoid over-writing selector.
-rw-r--r--CONTRIBUTE4
-rw-r--r--test/automated/Makefile.in14
2 files changed, 13 insertions, 5 deletions
diff --git a/CONTRIBUTE b/CONTRIBUTE
index 9c53fe2cccc..3ccaff3393f 100644
--- a/CONTRIBUTE
+++ b/CONTRIBUTE
@@ -263,7 +263,9 @@ top-level directory. Most tests are in the directory
263Tests which are tagged ":expensive-test" are enabled additionally, if 263Tests which are tagged ":expensive-test" are enabled additionally, if
264you run "make check-expensive" from the top-level directory. "make 264you run "make check-expensive" from the top-level directory. "make
265<filename>" as mentioned above incorporates expensive tests for 265<filename>" as mentioned above incorporates expensive tests for
266<filename>.el(c). 266<filename>.el(c). You can also define any ert selector on the command
267line. So "make check SELECTOR=nil" is equivalent to "make
268check-expensive".
267 269
268** Understanding Emacs Internals. 270** Understanding Emacs Internals.
269 271
diff --git a/test/automated/Makefile.in b/test/automated/Makefile.in
index 152e601270e..2534a65a9a3 100644
--- a/test/automated/Makefile.in
+++ b/test/automated/Makefile.in
@@ -89,7 +89,13 @@ WRITE_LOG = > $@ 2>&1 || { stat=ERROR; cat $@; }; echo $$stat: $@
89## Beware: it approximates 'no-byte-compile', so watch out for false-positives! 89## Beware: it approximates 'no-byte-compile', so watch out for false-positives!
90SELECTOR_DEFAULT = (quote (not (tag :expensive-test))) 90SELECTOR_DEFAULT = (quote (not (tag :expensive-test)))
91SELECTOR_EXPENSIVE = nil 91SELECTOR_EXPENSIVE = nil
92SELECTOR = 92ifndef SELECTOR
93SELECTOR_ACTUAL=$(SELECTOR_DEFAULT)
94else
95SELECTOR_ACTUAL=$(SELECTOR)
96endif
97
98
93%.log: ${srcdir}/%.el 99%.log: ${srcdir}/%.el
94 @if grep '^;.*no-byte-compile: t' $< > /dev/null; then \ 100 @if grep '^;.*no-byte-compile: t' $< > /dev/null; then \
95 loadfile=$<; \ 101 loadfile=$<; \
@@ -100,7 +106,7 @@ SELECTOR =
100 echo Testing $$loadfile; \ 106 echo Testing $$loadfile; \
101 stat=OK ; \ 107 stat=OK ; \
102 $(emacs) -l ert -l $$loadfile \ 108 $(emacs) -l ert -l $$loadfile \
103 --eval "(ert-run-tests-batch-and-exit ${SELECTOR})" ${WRITE_LOG} 109 --eval "(ert-run-tests-batch-and-exit ${SELECTOR_ACTUAL})" ${WRITE_LOG}
104 110
105ELFILES = $(sort $(wildcard ${srcdir}/*.el)) 111ELFILES = $(sort $(wildcard ${srcdir}/*.el))
106LOGFILES = $(patsubst %.el,%.log,$(notdir ${ELFILES})) 112LOGFILES = $(patsubst %.el,%.log,$(notdir ${ELFILES}))
@@ -123,7 +129,7 @@ $(foreach test,${TESTS},$(eval $(call test_template,${test})))
123 129
124## Rerun all default tests. 130## Rerun all default tests.
125check: mostlyclean 131check: mostlyclean
126 @${MAKE} check-doit SELECTOR="${SELECTOR_DEFAULT}" 132 @${MAKE} check-doit SELECTOR="${SELECTOR_ACTUAL}"
127 133
128## Rerun all default and expensive tests. 134## Rerun all default and expensive tests.
129.PHONY: check-expensive 135.PHONY: check-expensive
@@ -133,7 +139,7 @@ check-expensive: mostlyclean
133## Only re-run default tests whose .log is older than the test. 139## Only re-run default tests whose .log is older than the test.
134.PHONY: check-maybe 140.PHONY: check-maybe
135check-maybe: 141check-maybe:
136 @${MAKE} check-doit SELECTOR="${SELECTOR_DEFAULT}" 142 @${MAKE} check-doit SELECTOR="${SELECTOR_ACTUAL}"
137 143
138## Run the tests. 144## Run the tests.
139.PHONY: check-doit 145.PHONY: check-doit