diff options
| author | Michael Albinus | 2016-02-10 12:18:30 +0100 |
|---|---|---|
| committer | Michael Albinus | 2016-02-10 12:18:30 +0100 |
| commit | 3ad05a0dc46093dd6b8958747a0475b8baba954f (patch) | |
| tree | 6d1a5a0e50387f3fcd61caaedae53a285c87c98d | |
| parent | 12c50e82c9b432b2fc31f8fb2215f43ceea80822 (diff) | |
| download | emacs-3ad05a0dc46093dd6b8958747a0475b8baba954f.tar.gz emacs-3ad05a0dc46093dd6b8958747a0475b8baba954f.zip | |
Describe Makefile test targets in test/README
* CONTRIBUTE: Move Makefile test targets to test/README.
* Makefile.in:
* test/README: Describe Makefile test targets.
| -rw-r--r-- | CONTRIBUTE | 22 | ||||
| -rw-r--r-- | Makefile.in | 4 | ||||
| -rw-r--r-- | test/README | 58 |
3 files changed, 64 insertions, 20 deletions
diff --git a/CONTRIBUTE b/CONTRIBUTE index 5a5cb5db5a5..d8e102dc7fb 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE | |||
| @@ -257,26 +257,8 @@ If your test lasts longer than some few seconds, mark it in its | |||
| 257 | To run tests on the entire Emacs tree, run "make check" from the | 257 | To run tests on the entire Emacs tree, run "make check" from the |
| 258 | top-level directory. Most tests are in the directory | 258 | top-level directory. Most tests are in the directory |
| 259 | "test/automated". From the "test/automated" directory, run "make | 259 | "test/automated". From the "test/automated" directory, run "make |
| 260 | <filename>" to run the tests for <filename>.el(c). See | 260 | <filename>" to run the tests for <filename>.el(c). See "test/README" |
| 261 | "test/automated/Makefile" for more information. | 261 | for more information. |
| 262 | |||
| 263 | Tests which are tagged ":expensive-test" are enabled additionally, if | ||
| 264 | you run "make check-expensive" from the top-level directory. "make | ||
| 265 | <filename>" as mentioned above incorporates expensive tests for | ||
| 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". | ||
| 269 | |||
| 270 | You could also use predefined selectors of the Makefile. "make | ||
| 271 | <filename> SELECTOR='$(SELECTOR_DEFAULT)'" runs all tests for | ||
| 272 | <filename>.el(c) except the tests tagged as expensive. | ||
| 273 | |||
| 274 | Selectors can be defined with different methods, see (info "(ert)Test | ||
| 275 | Selectors") or | ||
| 276 | https://www.gnu.org/software/emacs/manual/html_node/ert/Test-Selectors.html | ||
| 277 | If your test file contains the tests "test-foo", "test2-foo" and | ||
| 278 | "test-foo-remote", and you want to run only the former two tests, you | ||
| 279 | could use a regexp: "make <filename> SELECTOR='\"foo$$\"'" . | ||
| 280 | 262 | ||
| 281 | ** Understanding Emacs Internals. | 263 | ** Understanding Emacs Internals. |
| 282 | 264 | ||
diff --git a/Makefile.in b/Makefile.in index 75fd15001a4..b212c914e56 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -57,6 +57,10 @@ | |||
| 57 | # | 57 | # |
| 58 | # make docs | 58 | # make docs |
| 59 | # Make Emacs documentation files from their sources; requires makeinfo. | 59 | # Make Emacs documentation files from their sources; requires makeinfo. |
| 60 | # | ||
| 61 | # make check or make check-expensive | ||
| 62 | # Run Emacs test suite. check-expensive runs also tests which | ||
| 63 | # take more time to perform. | ||
| 60 | 64 | ||
| 61 | SHELL = @SHELL@ | 65 | SHELL = @SHELL@ |
| 62 | 66 | ||
diff --git a/test/README b/test/README index 244832decdc..d2aee9bf57b 100644 --- a/test/README +++ b/test/README | |||
| @@ -1,4 +1,62 @@ | |||
| 1 | Copyright (C) 2008-2016 Free Software Foundation, Inc. | ||
| 2 | See the end of the file for license conditions. | ||
| 3 | |||
| 1 | This directory contains files intended to test various aspects of | 4 | This directory contains files intended to test various aspects of |
| 2 | Emacs's functionality. Please help add tests! | 5 | Emacs's functionality. Please help add tests! |
| 3 | 6 | ||
| 7 | Emacs uses ERT, Emacs Lisp Regression Testing, for testing. See (info | ||
| 8 | "(ert)") or https://www.gnu.org/software/emacs/manual/html_node/ert/ | ||
| 9 | for more information on writing and running tests. | ||
| 10 | |||
| 11 | All ERT test files are supposed to run from subdirectory automated/. | ||
| 12 | The Makefile in that directory supports the following targets: | ||
| 13 | |||
| 14 | * make check | ||
| 15 | Run all tests as defined in the directory. Expensive tests are | ||
| 16 | suppressed. The result of the tests for <filename>.el is stored in | ||
| 17 | <filename>.log. | ||
| 18 | |||
| 19 | * make check-maybe | ||
| 20 | Like "make check", but run only the tests for files which have | ||
| 21 | unresolved prerequisites. | ||
| 22 | |||
| 23 | * make check-expensive | ||
| 24 | Like "make check", but run also the tests marked as expensive. | ||
| 25 | |||
| 26 | * make <filename> or make <filename>.log | ||
| 27 | Run all tests declared in <filename>.el. This includes expensive | ||
| 28 | tests. In the former case the output is shown on the terminal, in | ||
| 29 | the latter case the output is written to <filename>.log. | ||
| 30 | |||
| 31 | ERT offers selectors, which make it possible to filter out which test | ||
| 32 | cases shall run. The make variable $(SELECTOR) gives you a simple | ||
| 33 | mean to use your own selectors. The ERT manual describes how | ||
| 34 | selectors are constructed, see (info "(ert)Test Selectors") or | ||
| 35 | https://www.gnu.org/software/emacs/manual/html_node/ert/Test-Selectors.html | ||
| 36 | |||
| 37 | You could use predefined selectors of the Makefile. "make <filename> | ||
| 38 | SELECTOR='$(SELECTOR_DEFAULT)'" runs all tests for <filename>.el | ||
| 39 | except the tests tagged as expensive. | ||
| 40 | |||
| 41 | If your test file contains the tests "test-foo", "test2-foo" and | ||
| 42 | "test-foo-remote", and you want to run only the former two tests, you | ||
| 43 | could use a selector regexp: "make <filename> SELECTOR='\"foo$$\"'". | ||
| 44 | |||
| 45 | |||
| 4 | (Also, see etc/compilation.txt for compilation mode font lock tests.) | 46 | (Also, see etc/compilation.txt for compilation mode font lock tests.) |
| 47 | |||
| 48 | |||
| 49 | This file is part of GNU Emacs. | ||
| 50 | |||
| 51 | GNU Emacs is free software: you can redistribute it and/or modify | ||
| 52 | it under the terms of the GNU General Public License as published by | ||
| 53 | the Free Software Foundation, either version 3 of the License, or | ||
| 54 | (at your option) any later version. | ||
| 55 | |||
| 56 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 57 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 58 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 59 | GNU General Public License for more details. | ||
| 60 | |||
| 61 | You should have received a copy of the GNU General Public License | ||
| 62 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||