Re: bailing out in tap tests nearly always a bad idea
| От | Andrew Dunstan | 
|---|---|
| Тема | Re: bailing out in tap tests nearly always a bad idea | 
| Дата | |
| Msg-id | d3d66aa9-422a-7dc9-0105-e3a679c9b849@dunslane.net обсуждение исходный текст | 
| Ответ на | Re: bailing out in tap tests nearly always a bad idea (Tom Lane <tgl@sss.pgh.pa.us>) | 
| Список | pgsql-hackers | 
On 2/14/22 12:58, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
>> Even just getting rid of the "Tests were run but no plan was declared and
>> done_testing() was not seen." noise would be helpful. So I think using a fatal
>> error routine that forced a failure to be recognized via ok(0, 'fatal error')
>> and then does done_testing() would be better...
> Maybe we could do something in an END block provided by Utils.pm?
> I still think that insisting that people avoid die() is going to
> be annoying.
>
>             
See references to $SIG{__DIE__} in `perldoc-f die` and `perldoc perlvar`
for how to set up a handler for die() cleanup. Maybe we could set up a
handler that calls done_testing(). ?
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
		
	В списке pgsql-hackers по дате отправления: