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, notmuch@notmuchmail.org

Cc:

From: Jani Nikula


On Sat, 21 Oct 2017, David Bremner <david@tethera.net> wrote:
> Jani Nikula <jani@nikula.org> 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. T310-emacs.sh
>> 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
>
>      id:cd03efa9c93ee54f7e7f7e166079062984ddd658.1506370901.git.jani@nikula.org
>
> on top breaks
>
>       ./devel/check-out-of-tree-build.sh 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:

id:20171021192141.6666-1-jani@nikula.org
id:20171021115802.31197-1-jani@nikula.org

And then this should work on top:

id:cd03efa9c93ee54f7e7f7e166079062984ddd658.1506370901.git.jani@nikula.org

BR,
Jani.
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: