From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: tap tests remove working directories |
Date: | 2015-08-10 13:49:09 |
Message-ID: | 55C8ABD5.3070006@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 08/09/2015 08:58 PM, Michael Paquier wrote:
> On Sun, Aug 9, 2015 at 11:19 PM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>>
>> On 08/09/2015 08:41 AM, Michael Paquier wrote:
>>> On Sun, Aug 9, 2015 at 1:40 AM, Andrew Dunstan <andrew(at)dunslane(dot)net>
>>> wrote:
>>>> On 08/08/2015 09:31 AM, Robert Haas wrote:
>>>>> On Fri, Aug 7, 2015 at 7:17 PM, Andrew Dunstan <andrew(at)dunslane(dot)net>
>>>>> wrote:
>>>>>> That certainly isn't what happens, and given the way this is done in
>>>>>> TestLib.pm, using the CLEANUP parameter of File::Temp's tempdir()
>>>>>> function,
>>>>>> it's not clear how we could do that easily.
>>>>> <shot-in-the-dark>
>>>>>
>>>>> Set cleanup to false and manually remove the directory later in the
>>>>> code, so that stuff runs only if we haven't died sooner?
>>>>>
>>>>> </shot-in-the-dark>
>>>>>
>>>> Yeah, maybe. I'm thinking of trying to do it more globally, like in
>>>> src/Makefile.global.in. That way we wouldn't have to add new code to
>>>> every
>>>> test file.
>>> If we rely on END to clean up the temporary data folder, there is no
>>> need to impact each test file, just the test functions called in
>>> TestLib.pm that could switch a flag to not perform any cleanup at the
>>> end of the run should an unexpected result be found. Now I am as well
>>> curious to see what you have in mind with manipulating
>>> Makefile.global.
>> See attached. If you have a better idea please post your patch.
> Sure. Attached is what I have in mind. Contrary to your version we
> keep around temp paths should a run succeed after one that has failed
> when running make check multiple times in a row. Perhaps it does not
> matter much in practice as log files get removed at each new run but I
> think that this allows a finer control in case of failure. Feel free
> to have a look.
Actually, I don't think this is a very good idea. You could end up with
a whole series of opaquely named directories from a series of failing
runs. If you want to keep the directory after a failure, and want to do
another run, then rename the directory. That's what you have to do with
the main regression tests, too. My version also has the benefit of
changing exactly 3 lines in the source :-)
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-08-10 13:55:01 | Re: tap tests remove working directories |
Previous Message | Simon Riggs | 2015-08-10 13:16:09 | Re: Test code is worth the space |