From: Michael Albinus Date: Mon, 5 Jun 2023 15:16:46 +0000 (+0200) Subject: Improve tree-sitter tests on emba X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7ca1d782f5910d0c3978c6798a45c6854ec668c7;p=emacs.git 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. --- diff --git a/test/infra/Dockerfile.emba b/test/infra/Dockerfile.emba index 4a3138fe685..f5259150518 100644 --- a/test/infra/Dockerfile.emba +++ b/test/infra/Dockerfile.emba @@ -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"))))' \ diff --git a/test/infra/Makefile.in b/test/infra/Makefile.in index 1af13a0096a..5f7d6281a7c 100644 --- a/test/infra/Makefile.in +++ b/test/infra/Makefile.in @@ -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 diff --git a/test/infra/test-jobs.yml b/test/infra/test-jobs.yml index 21c19c3043e..b49dd369611 100644 --- a/test/infra/test-jobs.yml +++ b/test/infra/test-jobs.yml @@ -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