Re: bailing out in tap tests nearly always a bad idea

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: bailing out in tap tests nearly always a bad idea
Дата
Msg-id 20220223164010.kntbogadur6szxt5@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: bailing out in tap tests nearly always a bad idea  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: bailing out in tap tests nearly always a bad idea  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Hi,

On 2022-02-23 08:43:38 -0500, Andrew Dunstan wrote:
> 
> On 2/22/22 15:54, Andres Freund wrote:
> > On 2022-02-22 15:10:30 -0500, Andrew Dunstan wrote:
> >> I'll be surprised if we can't come up with something cleaner than that.
> > Suggestions?
> 
> 
> If we just have the sig handler actions as:
> 
>     diag("died: $_[0]");
>     done_testing();   
> 
> we get:
> 
>     ok 1 - foo
>     # died: blorb at tst/tst.pl line 5.
>     1..1
>     # Looks like your test exited with 25 just after 1.
> 
> 
> Would that work?

Well, the if condition I had is needed, afaics. Otherwise we break eval() and
/ or risk crashing on syntax errors.  If you're just talking about diag() vs
ok(0, ...), I'm good with that.

Greetings,

Andres Freund



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ashutosh Sharma
Дата:
Сообщение: Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Frontend error logging style