Additional changes for "make check-expensive"
* CONTRIBUTE : Encourage use of ":tags '(:expensive-test)". Explain make target `check-expensive'. * etc/NEWS: Mention new make target `check-expensive'. * test/automated/Makefile.in (check-doit): New target. (check, check-expensive): Use it.
This commit is contained in:
parent
1729cf3eb5
commit
f5c762c878
3 changed files with 24 additions and 8 deletions
|
@ -251,12 +251,20 @@ Emacs uses ERT, Emacs Lisp Regression Testing, for testing. See (info
|
||||||
"(ert)") or https://www.gnu.org/software/emacs/manual/html_node/ert/
|
"(ert)") or https://www.gnu.org/software/emacs/manual/html_node/ert/
|
||||||
for more information on writing and running tests.
|
for more information on writing and running tests.
|
||||||
|
|
||||||
|
If your test lasts longer than some few seconds, mark it in its
|
||||||
|
`ert-deftest' definition with ":tags '(:expensive-test)".
|
||||||
|
|
||||||
To run tests on the entire Emacs tree, run "make check" from the
|
To run tests on the entire Emacs tree, run "make check" from the
|
||||||
top-level directory. Most tests are in the directory
|
top-level directory. Most tests are in the directory
|
||||||
"test/automated". From the "test/automated" directory, run "make
|
"test/automated". From the "test/automated" directory, run "make
|
||||||
<filename>" to run the tests for <filename>.el(c). See
|
<filename>" to run the tests for <filename>.el(c). See
|
||||||
"test/automated/Makefile" for more information.
|
"test/automated/Makefile" for more information.
|
||||||
|
|
||||||
|
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).
|
||||||
|
|
||||||
** Understanding Emacs Internals.
|
** Understanding Emacs Internals.
|
||||||
|
|
||||||
The best way to understand Emacs Internals is to read the code,
|
The best way to understand Emacs Internals is to read the code,
|
||||||
|
|
4
etc/NEWS
4
etc/NEWS
|
@ -96,6 +96,10 @@ so if you want to use it, you can always take a copy from an older Emacs.
|
||||||
Various resolutions are available as etc/images/icons/hicolor/*/apps/emacs.png.
|
Various resolutions are available as etc/images/icons/hicolor/*/apps/emacs.png.
|
||||||
The old Emacs logo icons are available as `emacs23.png' in the same location.
|
The old Emacs logo icons are available as `emacs23.png' in the same location.
|
||||||
|
|
||||||
|
** New make target `check-expensive' to run additional tests.
|
||||||
|
This includes all tests which run via "make check", plus additional
|
||||||
|
tests which take more time to perform.
|
||||||
|
|
||||||
|
|
||||||
* Startup Changes in Emacs 25.1
|
* Startup Changes in Emacs 25.1
|
||||||
|
|
||||||
|
|
|
@ -87,9 +87,9 @@ WRITE_LOG = > $@ 2>&1 || { stat=ERROR; cat $@; }; echo $$stat: $@
|
||||||
## to change this; bug#17848 - if that gets done, this can be simplified).
|
## to change this; bug#17848 - if that gets done, this can be simplified).
|
||||||
##
|
##
|
||||||
## Beware: it approximates 'no-byte-compile', so watch out for false-positives!
|
## Beware: it approximates 'no-byte-compile', so watch out for false-positives!
|
||||||
SELECTOR_DEFAULT=(not (tag :expensive-test))
|
SELECTOR_DEFAULT=(quote (not (tag :expensive-test)))
|
||||||
SELECTOR_EXPENSIVE=nil
|
SELECTOR_EXPENSIVE=nil
|
||||||
SELECTOR=${SELECTOR_DEFAULT}
|
SELECTOR=
|
||||||
%.log: ${srcdir}/%.el
|
%.log: ${srcdir}/%.el
|
||||||
@if grep '^;.*no-byte-compile: t' $< > /dev/null; then \
|
@if grep '^;.*no-byte-compile: t' $< > /dev/null; then \
|
||||||
loadfile=$<; \
|
loadfile=$<; \
|
||||||
|
@ -100,7 +100,7 @@ SELECTOR=${SELECTOR_DEFAULT}
|
||||||
echo Testing $$loadfile; \
|
echo Testing $$loadfile; \
|
||||||
stat=OK ; \
|
stat=OK ; \
|
||||||
$(emacs) -l ert -l $$loadfile \
|
$(emacs) -l ert -l $$loadfile \
|
||||||
--eval "(ert-run-tests-batch-and-exit '${SELECTOR})" ${WRITE_LOG}
|
--eval "(ert-run-tests-batch-and-exit ${SELECTOR})" ${WRITE_LOG}
|
||||||
|
|
||||||
ELFILES = $(sort $(wildcard ${srcdir}/*.el))
|
ELFILES = $(sort $(wildcard ${srcdir}/*.el))
|
||||||
LOGFILES = $(patsubst %.el,%.log,$(notdir ${ELFILES}))
|
LOGFILES = $(patsubst %.el,%.log,$(notdir ${ELFILES}))
|
||||||
|
@ -121,16 +121,20 @@ endef
|
||||||
|
|
||||||
$(foreach test,${TESTS},$(eval $(call test_template,${test})))
|
$(foreach test,${TESTS},$(eval $(call test_template,${test})))
|
||||||
|
|
||||||
|
## Rerun default tests.
|
||||||
## Re-run all the tests every time.
|
|
||||||
check:
|
check:
|
||||||
-@for f in *.log; do test ! -f $$f || mv $$f $$f~; done
|
@${MAKE} check-doit SELECTOR="${SELECTOR_DEFAULT}"
|
||||||
@${MAKE} check-maybe
|
|
||||||
|
|
||||||
## Rerun also expensive tests.
|
## Rerun also expensive tests.
|
||||||
.PHONY: check-expensive
|
.PHONY: check-expensive
|
||||||
check-expensive:
|
check-expensive:
|
||||||
@${MAKE} check SELECTOR=${SELECTOR_EXPENSIVE}
|
@${MAKE} check-doit SELECTOR="${SELECTOR_EXPENSIVE}"
|
||||||
|
|
||||||
|
## Re-run all the tests every time.
|
||||||
|
.PHONY: check-doit
|
||||||
|
check-doit:
|
||||||
|
-@for f in *.log; do test ! -f $$f || mv $$f $$f~; done
|
||||||
|
@${MAKE} check-maybe
|
||||||
|
|
||||||
## Only re-run tests whose .log is older than the test.
|
## Only re-run tests whose .log is older than the test.
|
||||||
.PHONY: check-maybe
|
.PHONY: check-maybe
|
||||||
|
|
Loading…
Add table
Reference in a new issue