diff options
| author | Michael Albinus | 2021-01-17 13:37:58 +0100 |
|---|---|---|
| committer | Michael Albinus | 2021-01-17 13:37:58 +0100 |
| commit | 39a65844e8d67b5ca3bb2d179e899ff99cd85618 (patch) | |
| tree | d527633e01c8040a7d5cc8ab5ca70fccca5e6025 | |
| parent | 152964362f905ba4f6d60d8c082330b739b8bc8e (diff) | |
| download | emacs-39a65844e8d67b5ca3bb2d179e899ff99cd85618.tar.gz emacs-39a65844e8d67b5ca3bb2d179e899ff99cd85618.zip | |
Add new targets to test/Makefile
* test/Makefile.in (SUBDIRS): New variable.
(subdir_template): New template.
(top) Create new check-<dirname> targets.
* test/README: Document them.
* test/infra/gitlab-ci.yml (test-lisp-net-inotify): Rename.
| -rw-r--r-- | test/Makefile.in | 20 | ||||
| -rw-r--r-- | test/README | 9 | ||||
| -rw-r--r-- | test/infra/gitlab-ci.yml | 4 |
3 files changed, 19 insertions, 14 deletions
diff --git a/test/Makefile.in b/test/Makefile.in index 2d595d9bf16..4ca43c8c443 100644 --- a/test/Makefile.in +++ b/test/Makefile.in | |||
| @@ -246,11 +246,17 @@ endef | |||
| 246 | 246 | ||
| 247 | $(foreach test,${TESTS},$(eval $(call test_template,${test}))) | 247 | $(foreach test,${TESTS},$(eval $(call test_template,${test}))) |
| 248 | 248 | ||
| 249 | # Get the tests for only a specific directory | 249 | ## Get the tests for only a specific directory. |
| 250 | NET_TESTS := $(patsubst %.el,%,$(wildcard lisp/net/*.el)) | 250 | SUBDIRS = $(sort $(shell find lisp src -type d ! -path "*resources*" -print)) |
| 251 | LISP_TESTS := $(patsubst %.el,%,$(wildcard lisp/*.el)) | 251 | |
| 252 | check-net: ${NET_TESTS} | 252 | define subdir_template |
| 253 | check-lisp: ${LISP_TESTS} | 253 | .PHONY: check-$(subst /,-,$(1)) |
| 254 | check-$(subst /,-,$(1)): | ||
| 255 | @${MAKE} check LOGFILES="$(patsubst %.el,%.log, \ | ||
| 256 | $(patsubst $(srcdir)/%,%,$(wildcard $(1)/*.el)))" | ||
| 257 | endef | ||
| 258 | |||
| 259 | $(foreach subdir, $(SUBDIRS), $(eval $(call subdir_template,$(subdir)))) | ||
| 254 | 260 | ||
| 255 | ifeq (@HAVE_MODULES@, yes) | 261 | ifeq (@HAVE_MODULES@, yes) |
| 256 | # -fPIC is a no-op on Windows, but causes a compiler warning | 262 | # -fPIC is a no-op on Windows, but causes a compiler warning |
| @@ -318,10 +324,10 @@ check-doit: | |||
| 318 | ifeq ($(TEST_INTERACTIVE), yes) | 324 | ifeq ($(TEST_INTERACTIVE), yes) |
| 319 | HOME=$(TEST_HOME) $(emacs) \ | 325 | HOME=$(TEST_HOME) $(emacs) \ |
| 320 | -l ert ${ert_opts} \ | 326 | -l ert ${ert_opts} \ |
| 321 | $(patsubst %,-l %,$(if $(findstring $(TEST_LOAD_EL),yes),$ELFILES,$(ELFILES:.el=))) \ | 327 | $(patsubst %,-l %,$(if $(findstring $(TEST_LOAD_EL),yes),$ELFILES,$(ELFILES:.el=))) \ |
| 322 | $(TEST_RUN_ERT) | 328 | $(TEST_RUN_ERT) |
| 323 | else | 329 | else |
| 324 | -@${MAKE} -k ${LOGFILES} | 330 | -@${MAKE} -k ${LOGFILES} |
| 325 | @$(emacs) --batch -l ert --eval \ | 331 | @$(emacs) --batch -l ert --eval \ |
| 326 | "(ert-summarize-tests-batch-and-exit ${SUMMARIZE_TESTS})" ${LOGFILES} | 332 | "(ert-summarize-tests-batch-and-exit ${SUMMARIZE_TESTS})" ${LOGFILES} |
| 327 | endif | 333 | endif |
diff --git a/test/README b/test/README index 38f4a109701..58f5f38bec6 100644 --- a/test/README +++ b/test/README | |||
| @@ -39,11 +39,10 @@ The Makefile in this directory supports the following targets: | |||
| 39 | * make check-all | 39 | * make check-all |
| 40 | Like "make check", but run all tests. | 40 | Like "make check", but run all tests. |
| 41 | 41 | ||
| 42 | * make check-lisp | 42 | * make check-<dirname> |
| 43 | Like "make check", but run only the tests in test/lisp/*.el | 43 | Like "make check", but run only the tests in test/<dirname>/*.el. |
| 44 | 44 | <dirname> is a relative directory path, which has replaced "/" by "-", | |
| 45 | * make check-net | 45 | like in "check-src" or "check-lisp-net". |
| 46 | Like "make check", but run only the tests in test/lisp/net/*.el | ||
| 47 | 46 | ||
| 48 | * make <filename> -or- make <filename>.log | 47 | * make <filename> -or- make <filename>.log |
| 49 | Run all tests declared in <filename>.el. This includes expensive | 48 | Run all tests declared in <filename>.el. This includes expensive |
diff --git a/test/infra/gitlab-ci.yml b/test/infra/gitlab-ci.yml index f9c0e0c11ab..b8d068a8474 100644 --- a/test/infra/gitlab-ci.yml +++ b/test/infra/gitlab-ci.yml | |||
| @@ -182,12 +182,12 @@ test-lisp-inotify: | |||
| 182 | target: emacs-inotify | 182 | target: emacs-inotify |
| 183 | make_params: "-C test check-lisp" | 183 | make_params: "-C test check-lisp" |
| 184 | 184 | ||
| 185 | test-net-inotify: | 185 | test-lisp-net-inotify: |
| 186 | stage: normal | 186 | stage: normal |
| 187 | extends: [.job-template, .test-template] | 187 | extends: [.job-template, .test-template] |
| 188 | variables: | 188 | variables: |
| 189 | target: emacs-inotify | 189 | target: emacs-inotify |
| 190 | make_params: "-C test check-net" | 190 | make_params: "-C test check-lisp-net" |
| 191 | 191 | ||
| 192 | test-filenotify-gio: | 192 | test-filenotify-gio: |
| 193 | # This tests file monitor libraries gfilemonitor and gio. | 193 | # This tests file monitor libraries gfilemonitor and gio. |