diff options
| author | Michael Albinus | 2025-05-12 16:39:15 +0200 |
|---|---|---|
| committer | Michael Albinus | 2025-05-12 16:39:15 +0200 |
| commit | b91efd401d68f22510856008ce79121b8b9bd199 (patch) | |
| tree | c4c015e25130e5393034fa413ae6c79c8e27d46e /test | |
| parent | 8b67e566b9fe156b6be8be0a6381052fa79abc2c (diff) | |
| download | emacs-b91efd401d68f22510856008ce79121b8b9bd199.tar.gz emacs-b91efd401d68f22510856008ce79121b8b9bd199.zip | |
Improve handling of tests in *-tests subdirs
* test/Makefile.in (subdir_template): Add rules for *-tests subdirs.
* test/infra/Makefile.in: Remove special handling of eieio, faceup
and so-long. Add recipes for *-tests subdirs. Filter out rules
for *-tests subdirs.
* test/infra/test-jobs.yml: Regenerate.
Diffstat (limited to 'test')
| -rw-r--r-- | test/Makefile.in | 3 | ||||
| -rw-r--r-- | test/infra/Makefile.in | 18 | ||||
| -rw-r--r-- | test/infra/test-jobs.yml | 57 |
3 files changed, 14 insertions, 64 deletions
diff --git a/test/Makefile.in b/test/Makefile.in index 3d8a8b87cd9..20505432e31 100644 --- a/test/Makefile.in +++ b/test/Makefile.in | |||
| @@ -258,7 +258,8 @@ SUBDIR_TARGETS = | |||
| 258 | define subdir_template | 258 | define subdir_template |
| 259 | SUBDIR_TARGETS += check-$(subst /,-,$(1)) | 259 | SUBDIR_TARGETS += check-$(subst /,-,$(1)) |
| 260 | .PHONY: check-$(subst /,-,$(1)) | 260 | .PHONY: check-$(subst /,-,$(1)) |
| 261 | check-$(subst /,-,$(1)): | 261 | check-$(subst /,-,$(1)): \ |
| 262 | $(patsubst %,check-%,$(subst /,-,$(wildcard $(1)/*-tests))) | ||
| 262 | @${MAKE} check LOGFILES="$(patsubst %.el,%.log, \ | 263 | @${MAKE} check LOGFILES="$(patsubst %.el,%.log, \ |
| 263 | $(patsubst $(srcdir)/%,%,$(wildcard ${srcdir}/$(1)/*.el)))" | 264 | $(patsubst $(srcdir)/%,%,$(wildcard ${srcdir}/$(1)/*.el)))" |
| 264 | endef | 265 | endef |
diff --git a/test/infra/Makefile.in b/test/infra/Makefile.in index 4598fe1688a..8347df4e2bf 100644 --- a/test/infra/Makefile.in +++ b/test/infra/Makefile.in | |||
| @@ -53,14 +53,6 @@ define subdir_template | |||
| 53 | @echo ' - changes:' >>$(FILE) | 53 | @echo ' - changes:' >>$(FILE) |
| 54 | @echo ' - $(1)/*.{h,c}' >>$(FILE) | 54 | @echo ' - $(1)/*.{h,c}' >>$(FILE) |
| 55 | endef | 55 | endef |
| 56 | else ifeq ($(findstring eieio, $(1)), eieio) | ||
| 57 | define changes | ||
| 58 | @echo ' - lisp/emacs-lisp/eieio*.el' >>$(FILE) | ||
| 59 | endef | ||
| 60 | else ifeq ($(findstring faceup, $(1)), faceup) | ||
| 61 | define changes | ||
| 62 | @echo ' - lisp/emacs-lisp/faceup*.el' >>$(FILE) | ||
| 63 | endef | ||
| 64 | else ifeq ($(findstring progmodes, $(1)), progmodes) | 56 | else ifeq ($(findstring progmodes, $(1)), progmodes) |
| 65 | define changes | 57 | define changes |
| 66 | @echo ' - $(1)/eglot.el' >>$(FILE) | 58 | @echo ' - $(1)/eglot.el' >>$(FILE) |
| @@ -72,10 +64,6 @@ define subdir_template | |||
| 72 | @echo ' - changes:' >>$(FILE) | 64 | @echo ' - changes:' >>$(FILE) |
| 73 | @echo ' - $(1)/*.el' >>$(FILE) | 65 | @echo ' - $(1)/*.el' >>$(FILE) |
| 74 | endef | 66 | endef |
| 75 | else ifeq ($(findstring so-long, $(1)), so-long) | ||
| 76 | define changes | ||
| 77 | @echo ' - lisp/so-long*.el' >>$(FILE) | ||
| 78 | endef | ||
| 79 | else ifeq ($(findstring textmodes, $(1)), textmodes) | 67 | else ifeq ($(findstring textmodes, $(1)), textmodes) |
| 80 | define changes | 68 | define changes |
| 81 | @echo ' - $(1)/*-ts-mode.el' >>$(FILE) | 69 | @echo ' - $(1)/*-ts-mode.el' >>$(FILE) |
| @@ -108,6 +96,9 @@ define subdir_template | |||
| 108 | @echo ' when: never' >>$(FILE) | 96 | @echo ' when: never' >>$(FILE) |
| 109 | @echo ' - changes:' >>$(FILE) | 97 | @echo ' - changes:' >>$(FILE) |
| 110 | $(changes) | 98 | $(changes) |
| 99 | $(foreach subdir, $(notdir $(wildcard ../$(1)/*-tests)), | ||
| 100 | @echo ' - test/$(1)/$(subdir)/*resources/**' >>$(FILE) | ||
| 101 | @echo ' - test/$(1)/$(subdir)/*.el' >>$(FILE)) | ||
| 111 | @echo ' - test/$(1)/*resources/**' >>$(FILE) | 102 | @echo ' - test/$(1)/*resources/**' >>$(FILE) |
| 112 | @echo ' - test/$(1)/*.el' >>$(FILE) | 103 | @echo ' - test/$(1)/*.el' >>$(FILE) |
| 113 | @echo ' variables:' >>$(FILE) | 104 | @echo ' variables:' >>$(FILE) |
| @@ -115,7 +106,8 @@ define subdir_template | |||
| 115 | @echo ' make_params: -C test $(target)' >>$(FILE) | 106 | @echo ' make_params: -C test $(target)' >>$(FILE) |
| 116 | endef | 107 | endef |
| 117 | 108 | ||
| 118 | $(foreach subdir, $(SUBDIRS), $(eval $(call subdir_template,$(subdir)))) | 109 | $(foreach subdir, $(filter-out %-tests,$(SUBDIRS)), \ |
| 110 | $(eval $(call subdir_template,$(subdir)))) | ||
| 119 | 111 | ||
| 120 | TREE-SITTER-FILES ?= $(shell cd .. ; \ | 112 | TREE-SITTER-FILES ?= $(shell cd .. ; \ |
| 121 | find lisp src -name "*-tests.el" | xargs grep -El "treesit.*-p" | \ | 113 | find lisp src -name "*-tests.el" | xargs grep -El "treesit.*-p" | \ |
diff --git a/test/infra/test-jobs.yml b/test/infra/test-jobs.yml index 180f29947ca..f0db97f55c0 100644 --- a/test/infra/test-jobs.yml +++ b/test/infra/test-jobs.yml | |||
| @@ -28,6 +28,8 @@ test-lisp-inotify: | |||
| 28 | when: never | 28 | when: never |
| 29 | - changes: | 29 | - changes: |
| 30 | - lisp/*.el | 30 | - lisp/*.el |
| 31 | - test/lisp/so-long-tests/*resources/** | ||
| 32 | - test/lisp/so-long-tests/*.el | ||
| 31 | - test/lisp/*resources/** | 33 | - test/lisp/*resources/** |
| 32 | - test/lisp/*.el | 34 | - test/lisp/*.el |
| 33 | variables: | 35 | variables: |
| @@ -147,45 +149,15 @@ test-lisp-emacs-lisp-inotify: | |||
| 147 | when: never | 149 | when: never |
| 148 | - changes: | 150 | - changes: |
| 149 | - lisp/emacs-lisp/*.el | 151 | - lisp/emacs-lisp/*.el |
| 150 | - test/lisp/emacs-lisp/*resources/** | ||
| 151 | - test/lisp/emacs-lisp/*.el | ||
| 152 | variables: | ||
| 153 | target: emacs-inotify | ||
| 154 | make_params: -C test check-lisp-emacs-lisp | ||
| 155 | |||
| 156 | test-lisp-emacs-lisp-eieio-tests-inotify: | ||
| 157 | stage: normal | ||
| 158 | extends: [.job-template, .test-template] | ||
| 159 | needs: | ||
| 160 | - job: build-image-inotify | ||
| 161 | optional: true | ||
| 162 | rules: | ||
| 163 | - if: '$CI_PIPELINE_SOURCE == "schedule"' | ||
| 164 | when: never | ||
| 165 | - changes: | ||
| 166 | - lisp/emacs-lisp/eieio*.el | ||
| 167 | - test/lisp/emacs-lisp/eieio-tests/*resources/** | 152 | - test/lisp/emacs-lisp/eieio-tests/*resources/** |
| 168 | - test/lisp/emacs-lisp/eieio-tests/*.el | 153 | - test/lisp/emacs-lisp/eieio-tests/*.el |
| 169 | variables: | ||
| 170 | target: emacs-inotify | ||
| 171 | make_params: -C test check-lisp-emacs-lisp-eieio-tests | ||
| 172 | |||
| 173 | test-lisp-emacs-lisp-faceup-tests-inotify: | ||
| 174 | stage: normal | ||
| 175 | extends: [.job-template, .test-template] | ||
| 176 | needs: | ||
| 177 | - job: build-image-inotify | ||
| 178 | optional: true | ||
| 179 | rules: | ||
| 180 | - if: '$CI_PIPELINE_SOURCE == "schedule"' | ||
| 181 | when: never | ||
| 182 | - changes: | ||
| 183 | - lisp/emacs-lisp/faceup*.el | ||
| 184 | - test/lisp/emacs-lisp/faceup-tests/*resources/** | 154 | - test/lisp/emacs-lisp/faceup-tests/*resources/** |
| 185 | - test/lisp/emacs-lisp/faceup-tests/*.el | 155 | - test/lisp/emacs-lisp/faceup-tests/*.el |
| 156 | - test/lisp/emacs-lisp/*resources/** | ||
| 157 | - test/lisp/emacs-lisp/*.el | ||
| 186 | variables: | 158 | variables: |
| 187 | target: emacs-inotify | 159 | target: emacs-inotify |
| 188 | make_params: -C test check-lisp-emacs-lisp-faceup-tests | 160 | make_params: -C test check-lisp-emacs-lisp |
| 189 | 161 | ||
| 190 | test-lisp-emulation-inotify: | 162 | test-lisp-emulation-inotify: |
| 191 | stage: normal | 163 | stage: normal |
| @@ -432,23 +404,6 @@ test-lisp-progmodes-inotify: | |||
| 432 | target: emacs-inotify | 404 | target: emacs-inotify |
| 433 | make_params: -C test check-lisp-progmodes | 405 | make_params: -C test check-lisp-progmodes |
| 434 | 406 | ||
| 435 | test-lisp-so-long-tests-inotify: | ||
| 436 | stage: normal | ||
| 437 | extends: [.job-template, .test-template] | ||
| 438 | needs: | ||
| 439 | - job: build-image-inotify | ||
| 440 | optional: true | ||
| 441 | rules: | ||
| 442 | - if: '$CI_PIPELINE_SOURCE == "schedule"' | ||
| 443 | when: never | ||
| 444 | - changes: | ||
| 445 | - lisp/so-long*.el | ||
| 446 | - test/lisp/so-long-tests/*resources/** | ||
| 447 | - test/lisp/so-long-tests/*.el | ||
| 448 | variables: | ||
| 449 | target: emacs-inotify | ||
| 450 | make_params: -C test check-lisp-so-long-tests | ||
| 451 | |||
| 452 | test-lisp-term-inotify: | 407 | test-lisp-term-inotify: |
| 453 | stage: normal | 408 | stage: normal |
| 454 | extends: [.job-template, .test-template] | 409 | extends: [.job-template, .test-template] |
| @@ -533,6 +488,8 @@ test-lisp-vc-inotify: | |||
| 533 | when: never | 488 | when: never |
| 534 | - changes: | 489 | - changes: |
| 535 | - lisp/vc/*.el | 490 | - lisp/vc/*.el |
| 491 | - test/lisp/vc/vc-tests/*resources/** | ||
| 492 | - test/lisp/vc/vc-tests/*.el | ||
| 536 | - test/lisp/vc/*resources/** | 493 | - test/lisp/vc/*resources/** |
| 537 | - test/lisp/vc/*.el | 494 | - test/lisp/vc/*.el |
| 538 | variables: | 495 | variables: |