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

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

bug#43359: package-tests leave temporary files behind


From: Stefan Kangas
Subject: bug#43359: package-tests leave temporary files behind
Date: Thu, 22 Oct 2020 17:27:31 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Glenn Morris <rgm@gnu.org> writes:
>
>> cd test
>> make lisp/emacs-lisp/package-tests
>>
>> -> two directories "/tmp/pkg-archive-base-*" are left behind on every run.
>
> This patch fixes the problem, but since it does a recursive deletion,
> it'd be nice if somebody could look at it and see whether it looks
> safe...

LGTM.

The alternative, I guess is something like:

diff --git a/test/lisp/emacs-lisp/package-tests.el
b/test/lisp/emacs-lisp/package-tests.el
index 155a8e6fce..23267545f8 100644
--- a/test/lisp/emacs-lisp/package-tests.el
+++ b/test/lisp/emacs-lisp/package-tests.el
@@ -151,6 +151,15 @@ with-package-test
                     `(insert-file-contents ,file))
                ,@body)))

+       (when ,upload-base
+         (dolist (f '("archive-contents"
+                      "simple-single-1.3.el"
+                      "simple-single-1.4.el"
+                      "simple-single-readme.txt"))
+           (ignore-errors
+             (delete-file
+              (expand-file-name f package-test-archive-upload-base))))
+         (delete-directory package-test-archive-upload-base))
        (when (file-directory-p package-test-user-dir)
          (delete-directory package-test-user-dir t))

But I don't think it's worth it...





reply via email to

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