bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#48350: 28.0.50; bytecomp-tests--dest-mountpoint test failure


From: Philipp
Subject: bug#48350: 28.0.50; bytecomp-tests--dest-mountpoint test failure
Date: Sat, 4 Sep 2021 21:30:50 +0200


> Am 12.08.2021 um 01:06 schrieb Lars Ingebrigtsen <larsi@gnus.org>:
> 
>      ;; 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")
>        (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))))


Such code is quite brittle.  Code should generally not try to detect whether 
it's running as part of a test, and not make decisions based on sich a 
detection, because such logic thwarts the idea of testing the actual code that 
runs in production.  I'd recommend deleting this snippet and finding a better 
way to achieve its goal.




reply via email to

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