aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorLars Ingebrigtsen2022-05-24 17:24:20 +0200
committerLars Ingebrigtsen2022-05-24 17:24:40 +0200
commit6232932f4bb0630ef4656ed2f8e977fd7fb59952 (patch)
tree02e9c3b6a5c2fa0056043c7af8be70e28016a30e /test/src
parented1045613e2cc5de5bba8bad05d7ebdf070ffe86 (diff)
downloademacs-6232932f4bb0630ef4656ed2f8e977fd7fb59952.tar.gz
emacs-6232932f4bb0630ef4656ed2f8e977fd7fb59952.zip
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).
Diffstat (limited to 'test/src')
-rw-r--r--test/src/comp-tests.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el
index 212d9e999f2..e7b534d00ec 100644
--- a/test/src/comp-tests.el
+++ b/test/src/comp-tests.el
@@ -51,7 +51,14 @@
51 (doc-string 3)) 51 (doc-string 3))
52 `(ert-deftest ,(intern (concat "comp-tests-" (symbol-name name))) ,args 52 `(ert-deftest ,(intern (concat "comp-tests-" (symbol-name name))) ,args
53 :tags '(:nativecomp) 53 :tags '(:nativecomp)
54 ,@docstring-and-body)) 54 ,@(and (stringp (car docstring-and-body))
55 (list (pop docstring-and-body)))
56 ;; Some of the tests leave spill files behind -- so create a
57 ;; sub-dir where native-comp can do its work, and then delete it
58 ;; at the end.
59 (ert-with-temp-directory dir
60 (let ((temporary-file-directory dir))
61 ,@docstring-and-body))))
55 62
56 63
57 64