define subdir_template
SUBDIR_TARGETS += check-$(subst /,-,$(1))
.PHONY: check-$(subst /,-,$(1))
- check-$(subst /,-,$(1)):
+ check-$(subst /,-,$(1)): \
+ $(patsubst %,check-%,$(subst /,-,$(wildcard $(1)/*-tests)))
@${MAKE} check LOGFILES="$(patsubst %.el,%.log, \
$(patsubst $(srcdir)/%,%,$(wildcard ${srcdir}/$(1)/*.el)))"
endef
@echo ' - changes:' >>$(FILE)
@echo ' - $(1)/*.{h,c}' >>$(FILE)
endef
- else ifeq ($(findstring eieio, $(1)), eieio)
- define changes
- @echo ' - lisp/emacs-lisp/eieio*.el' >>$(FILE)
- endef
- else ifeq ($(findstring faceup, $(1)), faceup)
- define changes
- @echo ' - lisp/emacs-lisp/faceup*.el' >>$(FILE)
- endef
else ifeq ($(findstring progmodes, $(1)), progmodes)
define changes
@echo ' - $(1)/eglot.el' >>$(FILE)
@echo ' - changes:' >>$(FILE)
@echo ' - $(1)/*.el' >>$(FILE)
endef
- else ifeq ($(findstring so-long, $(1)), so-long)
- define changes
- @echo ' - lisp/so-long*.el' >>$(FILE)
- endef
else ifeq ($(findstring textmodes, $(1)), textmodes)
define changes
@echo ' - $(1)/*-ts-mode.el' >>$(FILE)
@echo ' when: never' >>$(FILE)
@echo ' - changes:' >>$(FILE)
$(changes)
+ $(foreach subdir, $(notdir $(wildcard ../$(1)/*-tests)),
+ @echo ' - test/$(1)/$(subdir)/*resources/**' >>$(FILE)
+ @echo ' - test/$(1)/$(subdir)/*.el' >>$(FILE))
@echo ' - test/$(1)/*resources/**' >>$(FILE)
@echo ' - test/$(1)/*.el' >>$(FILE)
@echo ' variables:' >>$(FILE)
@echo ' make_params: -C test $(target)' >>$(FILE)
endef
-$(foreach subdir, $(SUBDIRS), $(eval $(call subdir_template,$(subdir))))
+$(foreach subdir, $(filter-out %-tests,$(SUBDIRS)), \
+ $(eval $(call subdir_template,$(subdir))))
TREE-SITTER-FILES ?= $(shell cd .. ; \
find lisp src -name "*-tests.el" | xargs grep -El "treesit.*-p" | \
when: never
- changes:
- lisp/*.el
+ - test/lisp/so-long-tests/*resources/**
+ - test/lisp/so-long-tests/*.el
- test/lisp/*resources/**
- test/lisp/*.el
variables:
when: never
- changes:
- lisp/emacs-lisp/*.el
- - test/lisp/emacs-lisp/*resources/**
- - test/lisp/emacs-lisp/*.el
- variables:
- target: emacs-inotify
- make_params: -C test check-lisp-emacs-lisp
-
-test-lisp-emacs-lisp-eieio-tests-inotify:
- stage: normal
- extends: [.job-template, .test-template]
- needs:
- - job: build-image-inotify
- optional: true
- rules:
- - if: '$CI_PIPELINE_SOURCE == "schedule"'
- when: never
- - changes:
- - lisp/emacs-lisp/eieio*.el
- test/lisp/emacs-lisp/eieio-tests/*resources/**
- test/lisp/emacs-lisp/eieio-tests/*.el
- variables:
- target: emacs-inotify
- make_params: -C test check-lisp-emacs-lisp-eieio-tests
-
-test-lisp-emacs-lisp-faceup-tests-inotify:
- stage: normal
- extends: [.job-template, .test-template]
- needs:
- - job: build-image-inotify
- optional: true
- rules:
- - if: '$CI_PIPELINE_SOURCE == "schedule"'
- when: never
- - changes:
- - lisp/emacs-lisp/faceup*.el
- test/lisp/emacs-lisp/faceup-tests/*resources/**
- test/lisp/emacs-lisp/faceup-tests/*.el
+ - test/lisp/emacs-lisp/*resources/**
+ - test/lisp/emacs-lisp/*.el
variables:
target: emacs-inotify
- make_params: -C test check-lisp-emacs-lisp-faceup-tests
+ make_params: -C test check-lisp-emacs-lisp
test-lisp-emulation-inotify:
stage: normal
target: emacs-inotify
make_params: -C test check-lisp-progmodes
-test-lisp-so-long-tests-inotify:
- stage: normal
- extends: [.job-template, .test-template]
- needs:
- - job: build-image-inotify
- optional: true
- rules:
- - if: '$CI_PIPELINE_SOURCE == "schedule"'
- when: never
- - changes:
- - lisp/so-long*.el
- - test/lisp/so-long-tests/*resources/**
- - test/lisp/so-long-tests/*.el
- variables:
- target: emacs-inotify
- make_params: -C test check-lisp-so-long-tests
-
test-lisp-term-inotify:
stage: normal
extends: [.job-template, .test-template]
when: never
- changes:
- lisp/vc/*.el
+ - test/lisp/vc/vc-tests/*resources/**
+ - test/lisp/vc/vc-tests/*.el
- test/lisp/vc/*resources/**
- test/lisp/vc/*.el
variables: