aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-22 16:09:49 -0500
committerCraig Jennings <c@cjennings.net>2026-05-22 16:09:49 -0500
commitfe4ee2dc51a4bbc70b90f6d104c222857384b4e7 (patch)
treee9b28800dc5fefb2a9876bab66a9c6c6b70c82e9 /Makefile
parentb90c32d6705f75840b239683c2c8221594008970 (diff)
downloaddotemacs-fe4ee2dc51a4bbc70b90f6d104c222857384b4e7.tar.gz
dotemacs-fe4ee2dc51a4bbc70b90f6d104c222857384b4e7.zip
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.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 4e19149df..26cb76195 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"