[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] feature/gnus-select 23fb252 097/218: Optimize "make check"
From: |
Andrew G Cohen |
Subject: |
[Emacs-diffs] feature/gnus-select 23fb252 097/218: Optimize "make check" and "make check-maybe" |
Date: |
Fri, 14 Dec 2018 03:35:09 -0500 (EST) |
branch: feature/gnus-select
commit 23fb2521f43f842d0c9d5877580accc83ce3d9c4
Author: Michael Albinus <address@hidden>
Commit: Andrew G Cohen <address@hidden>
Optimize "make check" and "make check-maybe"
* lisp/emacs-lisp/ert.el (ert-run-tests-batch): Print summary duration.
* test/Makefile.in (TEST_LOAD_EL): Set default to "no" for
targets all, check, and check-maybe. (Bug#30807)
* test/README: Reflect recent changes in Makefile.
* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test99-libarchive-tests): Tag it :unstable.
---
lisp/emacs-lisp/ert.el | 10 +++++++++-
test/Makefile.in | 3 ++-
test/README | 27 +++++++++++++++++++++------
test/lisp/net/tramp-archive-tests.el | 2 +-
4 files changed, 33 insertions(+), 9 deletions(-)
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index 3beb8a0..a1545073 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -1383,7 +1383,15 @@ Returns the stats object."
(if (zerop skipped)
""
(format ", %s skipped" skipped))
- (ert--format-time-iso8601 (ert--stats-end-time stats))
+ (if ert-batch-print-duration
+ (format
+ "%s, %f sec"
+ (ert--format-time-iso8601 (ert--stats-end-time
stats))
+ (float-time
+ (time-subtract
+ (ert--stats-end-time stats)
+ (ert--stats-start-time stats))))
+ (ert--format-time-iso8601 (ert--stats-end-time stats)))
(if (zerop expected-failures)
""
(format "\n%s expected failures" expected-failures)))
diff --git a/test/Makefile.in b/test/Makefile.in
index 0b6f8c2..426d22d 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -97,7 +97,8 @@ TEST_LOCALE = C
# Whether to run tests from .el files in preference to .elc, we do
# this by default since it gives nicer stacktraces.
# If you just want a pass/fail, setting this to no is much faster.
-TEST_LOAD_EL ?= yes
+export TEST_LOAD_EL ?= \
+ $(if $(findstring $(MAKECMDGOALS), all check check-maybe),no,yes)
# Additional settings for ert.
ert_opts =
diff --git a/test/README b/test/README
index 17135a0..37156c6 100644
--- a/test/README
+++ b/test/README
@@ -11,12 +11,23 @@ Emacs uses ERT, Emacs Lisp Regression Testing, for testing.
See (info
"(ert)") or https://www.gnu.org/software/emacs/manual/html_node/ert/
for more information on writing and running tests.
+Tests could be tagged by the developer. In this test directory, the
+following tags are recognised:
+
+* :expensive-test
+ The test needs a serious amount of time to run. It is not intended
+ to run on a regular basis by users. Instead, it runs on demand
+ only, or during regression tests.
+
+* :unstable
+ The test is under development. It shall run on demand only.
+
The Makefile in this directory supports the following targets:
* make check
- Run all tests as defined in the directory. Expensive tests are
- suppressed. The result of the tests for <filename>.el is stored in
- <filename>.log.
+ Run all tests as defined in the directory. Expensive and unstable
+ tests are suppressed. The result of the tests for <filename>.el is
+ stored in <filename>.log.
* make check-maybe
Like "make check", but run only the tests for files which have
@@ -25,6 +36,9 @@ The Makefile in this directory supports the following targets:
* make check-expensive
Like "make check", but run also the tests marked as expensive.
+* make check-all
+ Like "make check", but run all tests.
+
* make <filename> or make <filename>.log
Run all tests declared in <filename>.el. This includes expensive
tests. In the former case the output is shown on the terminal, in
@@ -38,15 +52,16 @@
https://www.gnu.org/software/emacs/manual/html_node/ert/Test-Selectors.html
You could use predefined selectors of the Makefile. "make <filename>
SELECTOR='$(SELECTOR_DEFAULT)'" runs all tests for <filename>.el
-except the tests tagged as expensive.
+except the tests tagged as expensive or unstable.
If your test file contains the tests "test-foo", "test2-foo" and
"test-foo-remote", and you want to run only the former two tests, you
could use a selector regexp: "make <filename> SELECTOR='\"foo$$\"'".
Note that although the test files are always compiled (unless they set
-no-byte-compile), the source files will be run by default, to give
-nicer backtraces. To run the compiled version of a test use
+no-byte-compile), the source files will be run when expensive or
+unstable tests are involved, to give nicer backtraces. To run the
+compiled version of a test use
make TEST_LOAD_EL=no ...
diff --git a/test/lisp/net/tramp-archive-tests.el
b/test/lisp/net/tramp-archive-tests.el
index a3201bd..b327e64 100644
--- a/test/lisp/net/tramp-archive-tests.el
+++ b/test/lisp/net/tramp-archive-tests.el
@@ -873,7 +873,7 @@ This tests also `file-executable-p', `file-writable-p' and
`set-file-modes'."
(ert-deftest tramp-archive-test99-libarchive-tests ()
"Run tests of libarchive test files."
- :tags '(:expensive-test)
+ :tags '(:expensive-test :unstable)
(skip-unless tramp-archive-enabled)
;; We do not want to run unless chosen explicitly. This test makes
;; sense only in my local environment. Michael Albinus.
- [Emacs-diffs] feature/gnus-select 496ccae 036/218: * Makefile.in (check-declare): Also check test/ directory., (continued)
- [Emacs-diffs] feature/gnus-select 496ccae 036/218: * Makefile.in (check-declare): Also check test/ directory., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select e16a1e7 028/218: Replace the obsolete process-kill-without-query in documentation, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 672b68c 043/218: Let warning about (:foo) be suppressible (Bug#30499), Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select f3b9db1 038/218: Improve support for desktop restoration in daemon mode, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select b8c0e0c 045/218: Fix create_process bug breaking eudc-expand-inline, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 77705ff 046/218: eshell-eval-using-options: Avoid compiler warning differently, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 97e6ea5 033/218: * test/lisp/vc/vc-tests.el (w32-application-type): Fix declaration., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 8ea5938 083/218: Minor copyedits in mule.texi, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select dca8b75 087/218: Support variable-unquoting syntax in bat-mode, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 5224b57 106/218: In frameset save pixel values with frame-resize-pixelwise non-nil (Bug#30141), Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 23fb252 097/218: Optimize "make check" and "make check-maybe",
Andrew G Cohen <=
- [Emacs-diffs] feature/gnus-select 537ed97 114/218: Pass json-readtable-error data as a list (bug#30489), Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select a684aeb 109/218: Add URL handler for file-name-directory (Bug#30444), Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 73f9e1d 125/218: * doc/emacs/rmail.texi: Fix broken link., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 82efded 096/218: Call enchant-lsmod correctly when Enchant is installed with a suffix, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select bda66bd 132/218: Improve port to NetBSD tzalloc, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select aa2ebec 141/218: Extend Tramp's UTF8 tests, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select b2b31ae 134/218: ; Spelling fix, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 59a41b8 107/218: Optimize tramp-tests.el, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select d74261f 158/218: * doc/lispref/windows.texi (Selecting Windows): Fix a typo., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 367ff81 120/218: More proofreading of the Emacs manual, Andrew G Cohen, 2018/12/14