From 4fbe435f515a26ea11732c982900a1f011dff589 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Fri, 22 May 2026 16:09:49 -0500 Subject: fix(test): make test-name resilient to load-time cwd changes make test-name loads every test file into one Emacs, then selects by name. test-system-defaults-functions.el requires system-defaults at load, which runs (setq default-directory user-home-dir), an intentional config choice. That leaked the cwd into the shared session, so every relative -l tests/X.el load after it resolved against the wrong directory and aborted the whole run with Error 255. I made two changes. test-name now passes absolute paths to -l so loads survive any cwd change, and the test contains the leak by let-binding default-directory around the require. The production setq stays as is. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4e19149d..26cb7619 100644 --- a/Makefile +++ b/Makefile @@ -204,7 +204,7 @@ endif @echo "Running tests matching pattern: $(TEST)..." @$(EMACS_TEST) \ -l ert \ - $(foreach test,$(ALL_TESTS),-l $(test)) \ + $(foreach test,$(ALL_TESTS),-l $(abspath $(test))) \ --eval '(ert-run-tests-batch-and-exit "$(TEST)")' @echo "✓ Tests matching '$(TEST)' complete" -- cgit v1.2.3