emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 8dd6120: Fix bytecomp container test case


From: Lars Ingebrigtsen
Subject: master 8dd6120: Fix bytecomp container test case
Date: Wed, 11 Aug 2021 19:19:35 -0400 (EDT)

branch: master
commit 8dd6120594569a1d8186211963094f53caa7a6ed
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix bytecomp container test case
    
    * lisp/startup.el (normal-top-level): Make startup more robust --
    we may not be allowed to create any directories when running under
    test mode (bug#48350).
---
 lisp/startup.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/startup.el b/lisp/startup.el
index f337f7c..58030ca 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -549,7 +549,11 @@ It is the default value of the variable `top-level'."
       ;; When $HOME is set to '/nonexistent' means we are running the
       ;; testsuite, add a temporary folder in front to produce there
       ;; new compilations.
-      (when (equal (getenv "HOME") "/nonexistent")
+      (when (and (equal (getenv "HOME") "/nonexistent")
+                 ;; We may be running in a chroot environment where we
+                 ;; can't write anything.
+                 (file-writable-p (expand-file-name
+                                   (or temporary-file-directory ""))))
         (let ((tmp-dir (make-temp-file "emacs-testsuite-" t)))
           (add-hook 'kill-emacs-hook (lambda () (delete-directory tmp-dir t)))
           (push tmp-dir native-comp-eln-load-path))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]