Introduce check-expensive tests.

* Makefile.in (check-expensive):
* test/automated/Makefile.in (check-expensive): New target.

* test/automated/auto-revert-tests.el
(auto-revert-test01-auto-revert-several-files):
* test/automated/file-notify-tests.el (file-notify--deftest-remote):
* test/automated/tramp-tests.el (tramp-test26-process-file)
(tramp-test27-start-file-process, tramp-test28-shell-command)
(tramp-test29-vc-registered)
(tramp-test31-special-characters-with-stat)
(tramp-test31-special-characters-with-perl)
(tramp-test31-special-characters-with-ls)
(tramp-test32-utf8-with-stat, tramp-test32-utf8-with-perl)
(tramp-test32-utf8-with-ls, tramp-test33-asynchronous-requests)
(tramp-test35-unload): Tag the tests as :expensive-test.
This commit is contained in:
Michael Albinus 2016-01-04 23:28:07 +01:00
parent 6300655ec9
commit 4e62197a64
5 changed files with 26 additions and 4 deletions

View file

@ -921,12 +921,12 @@ extraclean: $(extraclean_dirs:=_extraclean)
TAGS tags: lib lib-src src TAGS tags: lib lib-src src
$(MAKE) -C src tags $(MAKE) -C src tags
check: all check check-expensive: all
@if test ! -d test/automated; then \ @if test ! -d test/automated; then \
echo "You do not seem to have the test/ directory."; \ echo "You do not seem to have the test/ directory."; \
echo "Maybe you are using a release tarfile, rather than a repository checkout."; \ echo "Maybe you are using a release tarfile, rather than a repository checkout."; \
else \ else \
$(MAKE) -C test/automated check; \ $(MAKE) -C test/automated $@; \
fi fi
dist: dist:
@ -943,7 +943,7 @@ $(DOCS):
$(MAKE) -C doc/$(subst -, ,$@) $(MAKE) -C doc/$(subst -, ,$@)
.PHONY: $(DOCS) docs pdf ps .PHONY: $(DOCS) docs pdf ps
.PHONY: info dvi dist check html info-real info-dir check-info .PHONY: info dvi dist check check-expensive html info-real info-dir check-info
## TODO add etc/refcards. ## TODO add etc/refcards.
docs: $(DOCS) docs: $(DOCS)

View file

@ -87,6 +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_EXPENSIVE=nil
SELECTOR=${SELECTOR_DEFAULT}
%.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=$<; \
@ -97,7 +100,7 @@ WRITE_LOG = > $@ 2>&1 || { stat=ERROR; cat $@; }; echo $$stat: $@
echo Testing $$loadfile; \ echo Testing $$loadfile; \
stat=OK ; \ stat=OK ; \
$(emacs) -l ert -l $$loadfile \ $(emacs) -l ert -l $$loadfile \
-f ert-run-tests-batch-and-exit ${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}))
@ -124,6 +127,11 @@ check:
-@for f in *.log; do test ! -f $$f || mv $$f $$f~; done -@for f in *.log; do test ! -f $$f || mv $$f $$f~; done
@${MAKE} check-maybe @${MAKE} check-maybe
## Rerun also expensive tests.
.PHONY: check-expensive
check-expensive:
@${MAKE} check SELECTOR=${SELECTOR_EXPENSIVE}
## 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
check-maybe: ${LOGFILES} check-maybe: ${LOGFILES}

View file

@ -94,6 +94,7 @@
;; This is inspired by Bug#21841. ;; This is inspired by Bug#21841.
(ert-deftest auto-revert-test01-auto-revert-several-files () (ert-deftest auto-revert-test01-auto-revert-several-files ()
"Check autorevert for several files at once." "Check autorevert for several files at once."
:tags '(:expensive-test)
(skip-unless (executable-find "cp")) (skip-unless (executable-find "cp"))
(let* ((cp (executable-find "cp")) (let* ((cp (executable-find "cp"))

View file

@ -138,6 +138,7 @@ being the result.")
(declare (indent 1)) (declare (indent 1))
`(ert-deftest ,(intern (concat (symbol-name test) "-remote")) () `(ert-deftest ,(intern (concat (symbol-name test) "-remote")) ()
,docstring ,docstring
:tags '(:expensive-test)
(let* ((temporary-file-directory (let* ((temporary-file-directory
file-notify-test-remote-temporary-file-directory) file-notify-test-remote-temporary-file-directory)
(ert-test (ert-get-test ',test))) (ert-test (ert-get-test ',test)))

View file

@ -1394,6 +1394,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
(ert-deftest tramp-test26-process-file () (ert-deftest tramp-test26-process-file ()
"Check `process-file'." "Check `process-file'."
:tags '(:expensive-test)
(skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-enabled))
(skip-unless (skip-unless
(not (not
@ -1440,6 +1441,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
(ert-deftest tramp-test27-start-file-process () (ert-deftest tramp-test27-start-file-process ()
"Check `start-file-process'." "Check `start-file-process'."
:tags '(:expensive-test)
(skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-enabled))
(skip-unless (skip-unless
(not (not
@ -1509,6 +1511,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
(ert-deftest tramp-test28-shell-command () (ert-deftest tramp-test28-shell-command ()
"Check `shell-command'." "Check `shell-command'."
:tags '(:expensive-test)
(skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-enabled))
(skip-unless (skip-unless
(not (not
@ -1596,6 +1599,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
(ert-deftest tramp-test29-vc-registered () (ert-deftest tramp-test29-vc-registered ()
"Check `vc-registered'." "Check `vc-registered'."
:tags '(:expensive-test)
(skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-enabled))
(skip-unless (skip-unless
(eq (eq
@ -1971,6 +1975,7 @@ Several special characters do not work properly there."
(ert-deftest tramp-test31-special-characters-with-stat () (ert-deftest tramp-test31-special-characters-with-stat ()
"Check special characters in file names. "Check special characters in file names.
Use the `stat' command." Use the `stat' command."
:tags '(:expensive-test)
(skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-enabled))
(skip-unless (skip-unless
(eq (eq
@ -1989,6 +1994,7 @@ Use the `stat' command."
(ert-deftest tramp-test31-special-characters-with-perl () (ert-deftest tramp-test31-special-characters-with-perl ()
"Check special characters in file names. "Check special characters in file names.
Use the `perl' command." Use the `perl' command."
:tags '(:expensive-test)
(skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-enabled))
(skip-unless (skip-unless
(eq (eq
@ -2010,6 +2016,7 @@ Use the `perl' command."
(ert-deftest tramp-test31-special-characters-with-ls () (ert-deftest tramp-test31-special-characters-with-ls ()
"Check special characters in file names. "Check special characters in file names.
Use the `ls' command." Use the `ls' command."
:tags '(:expensive-test)
(skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-enabled))
(skip-unless (skip-unless
(eq (eq
@ -2050,6 +2057,7 @@ Use the `ls' command."
(ert-deftest tramp-test32-utf8-with-stat () (ert-deftest tramp-test32-utf8-with-stat ()
"Check UTF8 encoding in file names and file contents. "Check UTF8 encoding in file names and file contents.
Use the `stat' command." Use the `stat' command."
:tags '(:expensive-test)
(skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-enabled))
(skip-unless (skip-unless
(eq (eq
@ -2068,6 +2076,7 @@ Use the `stat' command."
(ert-deftest tramp-test32-utf8-with-perl () (ert-deftest tramp-test32-utf8-with-perl ()
"Check UTF8 encoding in file names and file contents. "Check UTF8 encoding in file names and file contents.
Use the `perl' command." Use the `perl' command."
:tags '(:expensive-test)
(skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-enabled))
(skip-unless (skip-unless
(eq (eq
@ -2089,6 +2098,7 @@ Use the `perl' command."
(ert-deftest tramp-test32-utf8-with-ls () (ert-deftest tramp-test32-utf8-with-ls ()
"Check UTF8 encoding in file names and file contents. "Check UTF8 encoding in file names and file contents.
Use the `ls' command." Use the `ls' command."
:tags '(:expensive-test)
(skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-enabled))
(skip-unless (skip-unless
(eq (eq
@ -2114,6 +2124,7 @@ Such requests could arrive from timers, process filters and
process sentinels. They shall not disturb each other." process sentinels. They shall not disturb each other."
;; Mark as failed until bug has been fixed. ;; Mark as failed until bug has been fixed.
:expected-result :failed :expected-result :failed
:tags '(:expensive-test)
(skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-enabled))
(skip-unless (skip-unless
(eq (eq
@ -2225,6 +2236,7 @@ process sentinels. They shall not disturb each other."
Since it unloads Tramp, it shall be the last test to run." Since it unloads Tramp, it shall be the last test to run."
;; Mark as failed until all symbols are unbound. ;; Mark as failed until all symbols are unbound.
:expected-result (if (featurep 'tramp) :failed :passed) :expected-result (if (featurep 'tramp) :failed :passed)
:tags '(:expensive-test)
(when (featurep 'tramp) (when (featurep 'tramp)
(unload-feature 'tramp 'force) (unload-feature 'tramp 'force)
;; No Tramp feature must be left. ;; No Tramp feature must be left.