From: David Bremner Date: Sat, 26 Aug 2023 10:45:36 +0000 (-0300) Subject: test: minimize impact of native compilation. X-Git-Tag: archive/debian/0.38_rc1-1~4 X-Git-Url: https://git.cworth.org/git?p=notmuch;a=commitdiff_plain;h=115d4d69ebbab213baae672ac4e81947877f364b 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). --- 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