aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Corallo2021-03-21 16:55:19 +0100
committerAndrea Corallo2021-03-21 17:26:40 +0100
commitaf739863b0a5fd3bbff048faef59b8feef45cca6 (patch)
tree11dc97f4523af52248af481a86df84faaea5c0a2
parentd0280ce1b160ddc440d4ecac0397c50d2f5235eb (diff)
downloademacs-af739863b0a5fd3bbff048faef59b8feef45cca6.tar.gz
emacs-af739863b0a5fd3bbff048faef59b8feef45cca6.zip
Add a tmp dir to `comp-eln-load-path' when running the testsuite.
* lisp/startup.el (normal-top-level): Tweak `comp-eln-load-path' adding a temp directory when running the testsuite.
-rw-r--r--lisp/startup.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index 7e8fa47aea7..3e39ebc6e22 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -537,13 +537,19 @@ It is the default value of the variable `top-level'."
537 (startup--xdg-or-homedot startup--xdg-config-home-emacs nil)) 537 (startup--xdg-or-homedot startup--xdg-config-home-emacs nil))
538 538
539 (when (featurep 'nativecomp) 539 (when (featurep 'nativecomp)
540 ;; Form `comp-eln-load-path'.
540 (defvar comp-eln-load-path) 541 (defvar comp-eln-load-path)
541 (let ((path-env (getenv "EMACSNATIVELOADPATH"))) 542 (let ((path-env (getenv "EMACSNATIVELOADPATH")))
542 (when path-env 543 (when path-env
543 (dolist (path (split-string path-env path-separator)) 544 (dolist (path (split-string path-env path-separator))
544 (unless (string= "" path) 545 (unless (string= "" path)
545 (push path comp-eln-load-path))))) 546 (push path comp-eln-load-path)))))
546 (push (concat user-emacs-directory "eln-cache/") comp-eln-load-path)) 547 (push (concat user-emacs-directory "eln-cache/") comp-eln-load-path)
548 ;; When $HOME is set to '/nonexistent' means we are running the
549 ;; testsuite, add a temporary folder in front to produce there
550 ;; new compilations.
551 (when (equal (getenv "HOME") "/nonexistent")
552 (push (make-temp-file "emacs-testsuite-" t) comp-eln-load-path)))
547 ;; Look in each dir in load-path for a subdirs.el file. If we 553 ;; Look in each dir in load-path for a subdirs.el file. If we
548 ;; find one, load it, which will add the appropriate subdirs of 554 ;; find one, load it, which will add the appropriate subdirs of
549 ;; that dir into load-path. This needs to be done before setting 555 ;; that dir into load-path. This needs to be done before setting