Re: [PATCH] test: remove --root option and fix TMP_DIRECTORY cleanup

Subject: Re: [PATCH] test: remove --root option and fix TMP_DIRECTORY cleanup

Date: Sat, 21 Oct 2017 22:31:35 +0300

To: David Bremner,


From: Jani Nikula

On Sat, 21 Oct 2017, David Bremner <> wrote:
> Jani Nikula <> writes:
>> The primary motivation here is to fix TMP_DIRECTORY cleanup prior to
>> running each test when the current working directory is not the test
>> subdirectory. Tests with failures would leave their TMP_DIRECTORY
>> directory behind for debugging, and repeated out-of-tree test runs
>> would have old temp directories. (This lead to e.g.
>> hanging because emacs would prompt for overwriting files.)
>> We remove the likely anyway defunct --root test option while at it,
>> just to be on the safe side when doing 'rm -rf' on the TMP_DIRECTORY.
> This seems to fix the problem I reported, however applying
> on top breaks
>       ./devel/ test
> I get lots of errors along the lines of
>       Error opening database at
>       /tmp/tmp.GD3HPpejbL/test/tmp.T350-crypto/mail/.notmuch: No such
>       file or directory
> So this patch seems to unbreak in-tree builds (and out of tree builds
> where we copy the whole test hierarchy), and is probably worth applying
> as is, but I wanted to give you a chance to respond before I proceed.

So these two should be applied first, in either order:

And then this should work on top:

notmuch mailing list