unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattias.engdegard@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: casouri@gmail.com, 69405@debbugs.gnu.org
Subject: bug#69405: [PATCH] .emacs.d/tree-sitter/ not used in tree-sitter tests
Date: Mon, 26 Feb 2024 17:26:43 +0100	[thread overview]
Message-ID: <8562D4AB-3030-4EA5-A9B6-935B9F5B883C@gmail.com> (raw)
In-Reply-To: <86y1b7uy1b.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 614 bytes --]

26 feb. 2024 kl. 14.59 skrev Eli Zaretskii <eliz@gnu.org>:

> Can't we do that in the test harness, instead of introducing
> test-suite dependencies into the built Emacs binary?  For example, how
> about adding to tree-sitter-extra-load-path in treesit-tests.el
> instead?

Yes, that's probably a better idea. We don't even need anything in the test suites if we set `treesit-extra-load-path` in the Makefile, as in this patch.

(We could set an environment variable instead, but then it would need decoding in each tree-sitter test as well, and the change to the Makefile wouldn't really be simpler.)


[-- Attachment #2: test-treesit-dir-2.diff --]
[-- Type: application/octet-stream, Size: 557 bytes --]

diff --git a/test/Makefile.in b/test/Makefile.in
index 720f5c7ff8c..3cbdbec4414 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -92,6 +92,10 @@ TEST_RUN_ERT =
 # Additional settings for ert.
 ert_opts =
 
+# Supply a path to local tree-sitter installations, as we run tests
+# without a valid HOME.
+ert_opts += --eval "(setq treesit-extra-load-path '(\"$(HOME)/.emacs.d/tree-sitter\"))"
+
 # Maximum length of lines in ert backtraces; nil for no limit.
 # (if empty, use the default ert-batch-backtrace-right-margin).
 TEST_BACKTRACE_LINE_LENGTH =

  reply	other threads:[~2024-02-26 16:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26 13:36 bug#69405: [PATCH] .emacs.d/tree-sitter/ not used in tree-sitter tests Mattias Engdegård
2024-02-26 13:59 ` Eli Zaretskii
2024-02-26 16:26   ` Mattias Engdegård [this message]
2024-02-26 16:52     ` Eli Zaretskii
2024-02-26 18:07       ` Mattias Engdegård
2024-02-26 21:34         ` Yuan Fu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8562D4AB-3030-4EA5-A9B6-935B9F5B883C@gmail.com \
    --to=mattias.engdegard@gmail.com \
    --cc=69405@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).