diff options
| author | Phillip Lord | 2016-01-15 22:11:39 +0000 |
|---|---|---|
| committer | Phillip Lord | 2016-01-15 22:11:39 +0000 |
| commit | 549a765efeca2748e68a5c6ce6c9238784e82535 (patch) | |
| tree | 368096e2fb9b3c1d413f86088d292087fb73acd0 | |
| parent | dadb841a06aa1ffd6d17c04ef83140dbd1ad7307 (diff) | |
| download | emacs-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-- | CONTRIBUTE | 4 | ||||
| -rw-r--r-- | test/automated/Makefile.in | 14 |
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 | |||
| 263 | Tests which are tagged ":expensive-test" are enabled additionally, if | 263 | Tests which are tagged ":expensive-test" are enabled additionally, if |
| 264 | you run "make check-expensive" from the top-level directory. "make | 264 | you 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 |
| 267 | line. So "make check SELECTOR=nil" is equivalent to "make | ||
| 268 | check-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! |
| 90 | SELECTOR_DEFAULT = (quote (not (tag :expensive-test))) | 90 | SELECTOR_DEFAULT = (quote (not (tag :expensive-test))) |
| 91 | SELECTOR_EXPENSIVE = nil | 91 | SELECTOR_EXPENSIVE = nil |
| 92 | SELECTOR = | 92 | ifndef SELECTOR |
| 93 | SELECTOR_ACTUAL=$(SELECTOR_DEFAULT) | ||
| 94 | else | ||
| 95 | SELECTOR_ACTUAL=$(SELECTOR) | ||
| 96 | endif | ||
| 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 | ||
| 105 | ELFILES = $(sort $(wildcard ${srcdir}/*.el)) | 111 | ELFILES = $(sort $(wildcard ${srcdir}/*.el)) |
| 106 | LOGFILES = $(patsubst %.el,%.log,$(notdir ${ELFILES})) | 112 | LOGFILES = $(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. |
| 125 | check: mostlyclean | 131 | check: 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 |
| 135 | check-maybe: | 141 | check-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 |