From 115d4d69ebbab213baae672ac4e81947877f364b Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sat, 26 Aug 2023 07:45:36 -0300 Subject: [PATCH] test: minimize impact of native compilation. Native compilation is kindof useless in the test suite because we throw away the cache after every subtest. The test suite could in principle share an eln cache within a given test file; for now try to minimize the amount of native-compilation. There is an intermittent bug where emacs loses track of its default-directory; I suspect (but have no proof) that bug is related to native compilation and/or race conditions. This patch seems to prevent that bug (or at least reduce its frequency). --- test/test-lib.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/test-lib.el b/test/test-lib.el index 236dd99e..4cfb8ef1 100644 --- a/test/test-lib.el +++ b/test/test-lib.el @@ -22,6 +22,15 @@ ;;; Code: +;; minimize impact of native compilation on the test suite. +;; These are the Emacs 29.1 version of the variables. +;; Leave trampolines enabled per Emacs upstream recommendations. +;; It is important to set these variables before loading any +;; .elc files. +(setq native-comp-jit-compilation nil) +(setq native-comp-speed -1) +(setq native-comp-async-jobs-number 1) + (require 'cl-lib) ;; Ensure that the dynamic variables that are defined by this library