Improve tree-sitter tests on emba

* test/infra/Dockerfile.emba (emacs-tree-sitter): Install further
grammars.

* test/infra/Makefile.in (subdir_template): Special handling of src.
(TREE-SITTER-FILES): Add treesit-tests.el.

* test/infra/test-jobs.yml: Regenerate.
This commit is contained in:
Michael Albinus 2023-06-05 17:16:46 +02:00
parent 9a28600a97
commit 7ca1d782f5
3 changed files with 23 additions and 2 deletions

View file

@ -114,13 +114,19 @@ RUN src/emacs -Q --batch \
--eval '(setq \
treesit-extra-load-path (list "/root/.emacs.d/tree-sitter") \
treesit-language-source-alist \
(quote ((c "https://github.com/tree-sitter/tree-sitter-c") \
(quote ((bash "https://github.com/tree-sitter/tree-sitter-bash") \
(c "https://github.com/tree-sitter/tree-sitter-c") \
(cpp "https://github.com/tree-sitter/tree-sitter-cpp") \
(css "https://github.com/tree-sitter/tree-sitter-css") \
(elixir "https://github.com/elixir-lang/tree-sitter-elixir") \
(go "https://github.com/tree-sitter/tree-sitter-go") \
(gomod "https://github.com/camdencheek/tree-sitter-go-mod") \
(heex "https://github.com/phoenixframework/tree-sitter-heex") \
(html "https://github.com/tree-sitter/tree-sitter-html") \
(java "https://github.com/tree-sitter/tree-sitter-java") \
(javascript "https://github.com/tree-sitter/tree-sitter-javascript") \
(json "https://github.com/tree-sitter/tree-sitter-json") \
(python "https://github.com/tree-sitter/tree-sitter-python") \
(ruby "https://github.com/tree-sitter/tree-sitter-ruby") \
(tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src") \
(typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src"))))' \

View file

@ -43,6 +43,10 @@ define subdir_template
$(eval
ifeq ($(findstring src, $(1)), src)
define changes
@echo ' - $(1)/treesit.{h,c}' >>$(FILE)
@echo ' - test/$(1)/treesit-tests.el' >>$(FILE)
@echo ' when: never' >>$(FILE)
@echo ' - changes:' >>$(FILE)
@echo ' - $(1)/*.{h,c}' >>$(FILE)
endef
else ifeq ($(findstring eieio, $(1)), eieio)
@ -100,7 +104,9 @@ endef
$(foreach subdir, $(SUBDIRS), $(eval $(call subdir_template,$(subdir))))
TREE-SITTER-FILES ?= $(shell cd .. ; find lisp -name "*-ts-mode-tests.el" | sort | sed s/\\.el/.log/)
TREE-SITTER-FILES ?= $(shell cd .. ; \
find lisp src \( -name "*-ts-mode-tests.el" -o -name "treesit-tests.el" \) | \
sort | sed s/\\.el/.log/)
all: generate-test-jobs

View file

@ -9,6 +9,10 @@ test-lib-src-inotify:
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: never
- changes:
- lib-src/treesit.{h,c}
- test/lib-src/treesit-tests.el
when: never
- changes:
- lib-src/*.{h,c}
- test/lib-src/*resources/**
@ -560,6 +564,10 @@ test-src-inotify:
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: never
- changes:
- src/treesit.{h,c}
- test/src/treesit-tests.el
when: never
- changes:
- src/*.{h,c}
- test/src/*resources/**
@ -578,3 +586,4 @@ test-src-inotify:
lisp/progmodes/java-ts-mode-tests.log
lisp/progmodes/ruby-ts-mode-tests.log
lisp/progmodes/typescript-ts-mode-tests.log
src/treesit-tests.log