1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 12:21:25 -08:00

Fix issue with nativecomp tests leaving files behind in /tmp

* test/src/comp-tests.el (comp-deftest): Ensure that no files are left
behind (bug#55611).
This commit is contained in:
Lars Ingebrigtsen 2022-05-24 17:24:20 +02:00
parent ed1045613e
commit 6232932f4b

View file

@ -51,7 +51,14 @@
(doc-string 3))
`(ert-deftest ,(intern (concat "comp-tests-" (symbol-name name))) ,args
:tags '(:nativecomp)
,@docstring-and-body))
,@(and (stringp (car docstring-and-body))
(list (pop docstring-and-body)))
;; Some of the tests leave spill files behind -- so create a
;; sub-dir where native-comp can do its work, and then delete it
;; at the end.
(ert-with-temp-directory dir
(let ((temporary-file-directory dir))
,@docstring-and-body))))