Tests which are tagged ":expensive-test" are enabled additionally, if
you run "make check-expensive" from the top-level directory. "make
<filename>" as mentioned above incorporates expensive tests for
-<filename>.el(c).
+<filename>.el(c). You can also define any ert selector on the command
+line. So "make check SELECTOR=nil" is equivalent to "make
+check-expensive".
** Understanding Emacs Internals.
## Beware: it approximates 'no-byte-compile', so watch out for false-positives!
SELECTOR_DEFAULT = (quote (not (tag :expensive-test)))
SELECTOR_EXPENSIVE = nil
-SELECTOR =
+ifndef SELECTOR
+SELECTOR_ACTUAL=$(SELECTOR_DEFAULT)
+else
+SELECTOR_ACTUAL=$(SELECTOR)
+endif
+
+
%.log: ${srcdir}/%.el
@if grep '^;.*no-byte-compile: t' $< > /dev/null; then \
loadfile=$<; \
echo Testing $$loadfile; \
stat=OK ; \
$(emacs) -l ert -l $$loadfile \
- --eval "(ert-run-tests-batch-and-exit ${SELECTOR})" ${WRITE_LOG}
+ --eval "(ert-run-tests-batch-and-exit ${SELECTOR_ACTUAL})" ${WRITE_LOG}
ELFILES = $(sort $(wildcard ${srcdir}/*.el))
LOGFILES = $(patsubst %.el,%.log,$(notdir ${ELFILES}))
## Rerun all default tests.
check: mostlyclean
- @${MAKE} check-doit SELECTOR="${SELECTOR_DEFAULT}"
+ @${MAKE} check-doit SELECTOR="${SELECTOR_ACTUAL}"
## Rerun all default and expensive tests.
.PHONY: check-expensive
## Only re-run default tests whose .log is older than the test.
.PHONY: check-maybe
check-maybe:
- @${MAKE} check-doit SELECTOR="${SELECTOR_DEFAULT}"
+ @${MAKE} check-doit SELECTOR="${SELECTOR_ACTUAL}"
## Run the tests.
.PHONY: check-doit