diff options
| author | Michael Albinus | 2025-05-01 12:47:44 +0200 |
|---|---|---|
| committer | Michael Albinus | 2025-05-01 12:47:44 +0200 |
| commit | ab67f684e92489da84bc6bb559e0d2dc0456d949 (patch) | |
| tree | 2a36b6b878aae99b39d5122b9c2fd59bf8606082 /test | |
| parent | b9632a9049d07de3a0d6f0ae005a28b38825ff82 (diff) | |
| download | emacs-ab67f684e92489da84bc6bb559e0d2dc0456d949.tar.gz emacs-ab67f684e92489da84bc6bb559e0d2dc0456d949.zip | |
Improve treesitter tests on emba
* test/infra/Dockerfile.emba (emacs-tree-sitter): Print language
versions.
* test/infra/gitlab-ci.yml (.job-template): Pass ${http_proxy},
${https_proxy} and ${no_proxy} to the docker call.
(.tree-sitter-template): Add some dependencies.
Diffstat (limited to 'test')
| -rw-r--r-- | test/infra/Dockerfile.emba | 13 | ||||
| -rw-r--r-- | test/infra/gitlab-ci.yml | 30 |
2 files changed, 32 insertions, 11 deletions
diff --git a/test/infra/Dockerfile.emba b/test/infra/Dockerfile.emba index 80056e35a1f..1c1fbfc361a 100644 --- a/test/infra/Dockerfile.emba +++ b/test/infra/Dockerfile.emba | |||
| @@ -123,13 +123,12 @@ RUN make -j `nproc` bootstrap | |||
| 123 | RUN mkdir -p /root/.emacs.d/tree-sitter | 123 | RUN mkdir -p /root/.emacs.d/tree-sitter |
| 124 | RUN git config --global http.sslverify "false" | 124 | RUN git config --global http.sslverify "false" |
| 125 | # See https://github.com/emacs-tree-sitter/tree-sitter-langs/tree/master/repos | 125 | # See https://github.com/emacs-tree-sitter/tree-sitter-langs/tree/master/repos |
| 126 | # The recommended versions are generated by 'treesit-admin-verify-major-mode-queries` | 126 | # The recommended versions are generated by 'treesit-admin-verify-major-mode-queries' |
| 127 | # at the beginning of every ts-mode file. Loading a ts-mode file adds its | 127 | # at the beginning of every ts-mode file. Loading a ts-mode file adds its |
| 128 | # grammar source to 'treesit-language-source-alist'. | 128 | # grammar source to 'treesit-language-source-alist'. |
| 129 | RUN src/emacs -Q --batch \ | 129 | RUN src/emacs -Q --batch \ |
| 130 | --eval \ | 130 | --eval '(message "library ABI min version %d max version %d" \ |
| 131 | '(message "ABI min version %d max version %d" \ | 131 | (treesit-library-abi-version t) (treesit-library-abi-version))' \ |
| 132 | (treesit-library-abi-version t) (treesit-library-abi-version))' \ | ||
| 133 | --eval '(setq treesit-extra-load-path (list "/root/.emacs.d/tree-sitter"))' \ | 132 | --eval '(setq treesit-extra-load-path (list "/root/.emacs.d/tree-sitter"))' \ |
| 134 | --eval '(dolist (feature (quote (c-ts-mode cmake-ts-mode csharp-mode \ | 133 | --eval '(dolist (feature (quote (c-ts-mode cmake-ts-mode csharp-mode \ |
| 135 | dockerfile-ts-mode elixir-ts-mode go-ts-mode heex-ts-mode java-ts-mode \ | 134 | dockerfile-ts-mode elixir-ts-mode go-ts-mode heex-ts-mode java-ts-mode \ |
| @@ -137,7 +136,11 @@ RUN src/emacs -Q --batch \ | |||
| 137 | sh-script typescript-ts-mode css-mode html-ts-mode markdown-ts-mode \ | 136 | sh-script typescript-ts-mode css-mode html-ts-mode markdown-ts-mode \ |
| 138 | mhtml-ts-mode toml-ts-mode yaml-ts-mode treesit-x))) (require feature))' \ | 137 | mhtml-ts-mode toml-ts-mode yaml-ts-mode treesit-x))) (require feature))' \ |
| 139 | --eval '(dolist (lang (mapcar (quote car) treesit-language-source-alist)) \ | 138 | --eval '(dolist (lang (mapcar (quote car) treesit-language-source-alist)) \ |
| 140 | (treesit-install-language-grammar lang "/root/.emacs.d/tree-sitter"))' | 139 | (treesit-install-language-grammar lang "/root/.emacs.d/tree-sitter"))' \ |
| 140 | --eval '(message "treesit-language-source-alist\n%s" \ | ||
| 141 | (pp-to-string treesit-language-source-alist))' \ | ||
| 142 | --eval '(dolist (lang (sort (mapcar (quote car) treesit-language-source-alist))) \ | ||
| 143 | (message "%s ABI version %d" lang (treesit-language-abi-version lang)))' | ||
| 141 | 144 | ||
| 142 | FROM emacs-base as emacs-gnustep | 145 | FROM emacs-base as emacs-gnustep |
| 143 | 146 | ||
diff --git a/test/infra/gitlab-ci.yml b/test/infra/gitlab-ci.yml index 9c2480e92e2..d50c6193a73 100644 --- a/test/infra/gitlab-ci.yml +++ b/test/infra/gitlab-ci.yml | |||
| @@ -84,7 +84,26 @@ default: | |||
| 84 | script: | 84 | script: |
| 85 | - docker pull ${CI_REGISTRY_IMAGE}:${target}-${BUILD_TAG} | 85 | - docker pull ${CI_REGISTRY_IMAGE}:${target}-${BUILD_TAG} |
| 86 | - 'export PWD=$(pwd)' | 86 | - 'export PWD=$(pwd)' |
| 87 | - 'docker run -i -e EMACS_EMBA_CI=${EMACS_EMBA_CI} -e EMACS_TEST_JUNIT_REPORT=${EMACS_TEST_JUNIT_REPORT} -e EMACS_TEST_TIMEOUT=${EMACS_TEST_TIMEOUT} -e EMACS_TEST_VERBOSE=${EMACS_TEST_VERBOSE} -e NPROC=`nproc` --volumes-from $(docker ps -q -f "label=com.gitlab.gitlab-runner.job.id=${CI_JOB_ID}"):ro --name ${test_name} ${CI_REGISTRY_IMAGE}:${target}-${BUILD_TAG} /bin/bash -xvc "git fetch ${PWD} HEAD && echo checking out these updated files && git diff --name-only FETCH_HEAD && ( git diff --name-only FETCH_HEAD | xargs git checkout -f FETCH_HEAD ) && make -j \$NPROC && make -k -j \$NPROC ${make_params}"' | 87 | - 'docker run -i \ |
| 88 | -e EMACS_EMBA_CI=${EMACS_EMBA_CI} \ | ||
| 89 | -e EMACS_TEST_JUNIT_REPORT=${EMACS_TEST_JUNIT_REPORT} \ | ||
| 90 | -e EMACS_TEST_TIMEOUT=${EMACS_TEST_TIMEOUT} \ | ||
| 91 | -e EMACS_TEST_VERBOSE=${EMACS_TEST_VERBOSE} \ | ||
| 92 | -e NPROC=`nproc` \ | ||
| 93 | -e http_proxy=${http_proxy} \ | ||
| 94 | -e https_proxy=${https_proxy} \ | ||
| 95 | -e no_proxy=${no_proxy} \ | ||
| 96 | --volumes-from $(docker ps -q -f "label=com.gitlab.gitlab-runner.job.id=${CI_JOB_ID}"):ro \ | ||
| 97 | --name ${test_name} \ | ||
| 98 | ${CI_REGISTRY_IMAGE}:${target}-${BUILD_TAG} \ | ||
| 99 | /bin/bash -xvc \ | ||
| 100 | "git fetch ${PWD} HEAD && \ | ||
| 101 | echo checking out these updated files && \ | ||
| 102 | git diff --name-only FETCH_HEAD && \ | ||
| 103 | ( git diff --name-only FETCH_HEAD | \ | ||
| 104 | xargs git checkout -f FETCH_HEAD ) && \ | ||
| 105 | make -j \$NPROC && \ | ||
| 106 | make -k -j \$NPROC ${make_params}"' | ||
| 88 | after_script: | 107 | after_script: |
| 89 | # - docker ps -a | 108 | # - docker ps -a |
| 90 | # - pwd; printenv | 109 | # - pwd; printenv |
| @@ -187,13 +206,14 @@ default: | |||
| 187 | - "**.in" | 206 | - "**.in" |
| 188 | - lisp/align.el | 207 | - lisp/align.el |
| 189 | - lisp/progmodes/*-ts-mode.el | 208 | - lisp/progmodes/*-ts-mode.el |
| 209 | - lisp/progmodes/c-ts-common.el | ||
| 190 | - lisp/progmodes/csharp-mode.el | 210 | - lisp/progmodes/csharp-mode.el |
| 191 | - lisp/progmodes/js.el | 211 | - lisp/progmodes/js.el |
| 192 | - lisp/progmodes/python.el | 212 | - lisp/progmodes/python.el |
| 193 | - lisp/progmodes/sh-script.el | 213 | - lisp/progmodes/sh-script.el |
| 194 | - lisp/textmodes/*-ts-mode.el | 214 | - lisp/textmodes/*-ts-mode.el |
| 195 | - lisp/textmodes/css-mode.el | 215 | - lisp/textmodes/css-mode.el |
| 196 | - lisp/treesit.el | 216 | - lisp/treesit*.el |
| 197 | - src/treesit.{h,c} | 217 | - src/treesit.{h,c} |
| 198 | - test/infra/* | 218 | - test/infra/* |
| 199 | - test/lisp/align-resources/** | 219 | - test/lisp/align-resources/** |
| @@ -293,10 +313,8 @@ test-eglot: | |||
| 293 | make_params: >- | 313 | make_params: >- |
| 294 | check-expensive | 314 | check-expensive |
| 295 | TEST_HOME=/root LOGFILES="lisp/progmodes/eglot-tests.log" | 315 | TEST_HOME=/root LOGFILES="lisp/progmodes/eglot-tests.log" |
| 296 | # EMACS_EXTRAOPT="--eval \(package-reinstall\ \(quote\ company\)\) | 316 | # EMACS_EXTRAOPT="--eval \(use-package\ company\ :ensure\ t\) |
| 297 | # --eval \(package-reinstall\ \(quote\ yasnippet\)\) | 317 | # --eval \(use-package\ yasnippet\ :ensure\ t\)" |
| 298 | # --eval \(use-package\ company\) | ||
| 299 | # --eval \(use-package\ yasnippet\)" | ||
| 300 | 318 | ||
| 301 | build-image-tree-sitter: | 319 | build-image-tree-sitter: |
| 302 | stage: platform-images | 320 | stage: platform-images |