]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve tree-sitter tests on emba
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 5 Jun 2023 15:16:46 +0000 (17:16 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 5 Jun 2023 15:16:46 +0000 (17:16 +0200)
* 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.

test/infra/Dockerfile.emba
test/infra/Makefile.in
test/infra/test-jobs.yml

index 4a3138fe685a6f43c96e61356cbe76719273a643..f5259150518a33eeec5ce96c570c423d88ac0a51 100644 (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"))))' \
index 1af13a0096a0af115a470fc6e26f44fbea68f202..5f7d6281a7ca63c37cd006d127675bbe18a6c847 100644 (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
 
index 21c19c3043ed8e19b87c8ac31ce0660ac9381581..b49dd3696112b89eac706a8ef7a183a2d6c34f0a 100644 (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