1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00

Extend treesitter tests on emba

* test/infra/Dockerfile.emba (emacs-tree-sitter): Install c-ashrp
grammar.

* test/infra/Makefile.in (TREE-SITTER-FILES): Add csharp-mode-tests.el.
(tree-sitter-files): Rename from tree-sitter-files-template.
Generate .tree-sitter-files.

* test/infra/gitlab-ci.yml (test-tree-sitter): Extend .tree-sitter-files.

* test/infra/test-jobs.yml: Regenerate.
This commit is contained in:
Michael Albinus 2024-06-24 20:02:07 +02:00
parent 7e8a97ac78
commit ce4f56caf7
4 changed files with 16 additions and 10 deletions

View File

@ -145,6 +145,7 @@ RUN src/emacs -Q --batch \
treesit-language-source-alist \
(quote ((bash "https://github.com/tree-sitter/tree-sitter-bash") \
(c "https://github.com/tree-sitter/tree-sitter-c") \
(c-sharp "https://github.com/tree-sitter/tree-sitter-c-sharp") \
(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") \

View File

@ -117,22 +117,25 @@ endef
$(foreach subdir, $(SUBDIRS), $(eval $(call subdir_template,$(subdir))))
# js-tests.el and python-tests.el don't follow test file name convention.
# csharp-mode-tests.el, js-tests.el and python-tests.el don't follow
# test file name convention.
TREE-SITTER-FILES ?= $(shell cd .. ; \
find lisp src \( -name "*-ts-mode-tests.el" -o -name "treesit-tests.el" \
-o -name "js-tests.el" -o -name "python-tests.el" \) | \
-o -name "csharp-mode-tests.el" -o -name "js-tests.el" \
-o -name "python-tests.el" \) | \
sort | sed s/\\.el/.log/)
all: generate-test-jobs
.PHONY: generate-test-jobs $(FILE) $(SUBDIR_TARGETS) tree-sitter-files-template
.PHONY: generate-test-jobs $(FILE) $(SUBDIR_TARGETS) tree-sitter-files
generate-test-jobs: $(FILE) $(SUBDIR_TARGETS) tree-sitter-files-template
generate-test-jobs: $(FILE) $(SUBDIR_TARGETS) tree-sitter-files
tree-sitter-files-template:
tree-sitter-files:
@echo >>$(FILE)
@echo "# js-tests.el and python-tests.el don't follow test file name convention." >>$(FILE)
@echo '.tree-sitter-files-template:' >>$(FILE)
@echo "# csharp-mode-tests.el, js-tests.el and python-tests.el don't follow" >>$(FILE)
@echo "# test file name convention." >>$(FILE)
@echo '.tree-sitter-files:' >>$(FILE)
@echo ' variables:' >>$(FILE)
@echo ' tree_sitter_files: >-' >>$(FILE)
@for name in $(TREE-SITTER-FILES) ; do echo " $${name}" >>$(FILE) ; done

View File

@ -294,7 +294,7 @@ build-image-tree-sitter:
test-tree-sitter:
stage: platforms
extends: [.job-template, .test-template, .tree-sitter-template, .tree-sitter-files-template]
extends: [.job-template, .test-template, .tree-sitter-template, .tree-sitter-files]
needs:
- job: build-image-tree-sitter
optional: true

View File

@ -577,10 +577,12 @@ test-src-inotify:
target: emacs-inotify
make_params: -C test check-src
# js-tests.el and python-tests.el don't follow test file name convention.
.tree-sitter-files-template:
# csharp-mode-tests.el, js-tests.el and python-tests.el don't follow
# test file name convention.
.tree-sitter-files:
variables:
tree_sitter_files: >-
lisp/progmodes/csharp-mode-tests.log
lisp/progmodes/c-ts-mode-tests.log
lisp/progmodes/elixir-ts-mode-tests.log
lisp/progmodes/go-ts-mode-tests.log