Re: tap tests remove working directories - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: tap tests remove working directories
Date
Msg-id CAB7nPqRjqRanu1JoNj3rhAEWNn_cG5aB2==3sZTG5bL8Yz3B7g@mail.gmail.com
Whole thread Raw
In response to Re: tap tests remove working directories  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: tap tests remove working directories  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Sun, Aug 9, 2015 at 1:40 AM, Andrew Dunstan <andrew@dunslane.net> wrote:
>
> On 08/08/2015 09:31 AM, Robert Haas wrote:
>>
>> On Fri, Aug 7, 2015 at 7:17 PM, Andrew Dunstan <andrew@dunslane.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.
-- 
Michael



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: make check-world problem
Next
From: Andrew Dunstan
Date:
Subject: Re: tap tests remove working directories