Re: [HACKERS] Show backtrace when tap tests fail

2017-09-20 Thread David Steele
On 9/20/17 6:26 AM, Dagfinn Ilmari Mannsåker wrote: > Craig Ringer writes: > >> On 20 September 2017 at 06:36, David Steele wrote: >> >>> >>> I just use: >>> >>> $SIG{__DIE__} = sub {Carp::confess @_}; > > That is the basic idea behind both

Re: [HACKERS] Show backtrace when tap tests fail

2017-09-20 Thread Dagfinn Ilmari Mannsåker
Craig Ringer writes: > On 20 September 2017 at 06:36, David Steele wrote: > >> >> I just use: >> >> $SIG{__DIE__} = sub {Carp::confess @_}; That is the basic idea behind both Carp::Always and Devel::Confess, but they also avoid breaking non-string

Re: [HACKERS] Show backtrace when tap tests fail

2017-09-19 Thread Craig Ringer
On 20 September 2017 at 06:36, David Steele wrote: > > I just use: > > $SIG{__DIE__} = sub {Carp::confess @_}; > That's what I patched into my TestLib.pm too, until I learned of Carp::Always. I'd rather have Carp::Always, but it's definitely an OK fallback. -- Craig

Re: [HACKERS] Show backtrace when tap tests fail

2017-09-19 Thread David Steele
On 9/19/17 5:25 PM, Tom Lane wrote: Andres Freund writes: On 2017-09-19 17:15:21 -0400, Tom Lane wrote: Meh --- Carp::Always isn't standard either, so I think this is just extra complication with little value-add. Let's just do the Devel::Confess incantation as Dagfinn

Re: [HACKERS] Show backtrace when tap tests fail

2017-09-19 Thread Tom Lane
Andres Freund writes: > On 2017-09-19 17:15:21 -0400, Tom Lane wrote: >> Meh --- Carp::Always isn't standard either, so I think this is just extra >> complication with little value-add. Let's just do the Devel::Confess >> incantation as Dagfinn has it. > Has ~25 times the

Re: [HACKERS] Show backtrace when tap tests fail

2017-09-19 Thread Andres Freund
On 2017-09-19 17:15:21 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2017-09-19 21:37:26 +0100, Dagfinn Ilmari Mannsåker wrote: > >> Devel::Confess is more thorough, so +1 on that. > > > Or just try Devel::Confess first, and if the require fails, go to > >

Re: [HACKERS] Show backtrace when tap tests fail

2017-09-19 Thread Tom Lane
Andres Freund writes: > On 2017-09-19 21:37:26 +0100, Dagfinn Ilmari Mannsåker wrote: >> Devel::Confess is more thorough, so +1 on that. > Or just try Devel::Confess first, and if the require fails, go to > Carp::always. Meh --- Carp::Always isn't standard either, so I think

Re: [HACKERS] Show backtrace when tap tests fail

2017-09-19 Thread Dagfinn Ilmari Mannsåker
Tom Lane writes: > Andrew Dunstan writes: >> On 09/19/2017 01:31 PM, Andres Freund wrote: >>> # Include module showing backtraces upon failures. As it's a >>> non-standard module, don't fail if not installed. >>> eval { use Carp::Always; } >

Re: [HACKERS] Show backtrace when tap tests fail

2017-09-19 Thread Andres Freund
On 2017-09-19 21:37:26 +0100, Dagfinn Ilmari Mannsåker wrote: > Andrew Dunstan writes: > > > On 09/19/2017 01:31 PM, Andres Freund wrote: > >> Hi, > >> > >> I've had a couple cases where tap tests died, and I couldn't easily see > >> where / why. For development

Re: [HACKERS] Show backtrace when tap tests fail

2017-09-19 Thread Dagfinn Ilmari Mannsåker
Andrew Dunstan writes: > On 09/19/2017 01:31 PM, Andres Freund wrote: >> Hi, >> >> I've had a couple cases where tap tests died, and I couldn't easily see >> where / why. For development of a new test I found it useful to show >> backtraces in that case - just

Re: [HACKERS] Show backtrace when tap tests fail

2017-09-19 Thread Tom Lane
Andrew Dunstan writes: > On 09/19/2017 01:31 PM, Andres Freund wrote: >> # Include module showing backtraces upon failures. As it's a >> non-standard module, don't fail if not installed. >> eval { use Carp::Always; } > Or maybe Devel::Confess ? Neither one seems

Re: [HACKERS] Show backtrace when tap tests fail

2017-09-19 Thread Andrew Dunstan
On 09/19/2017 01:31 PM, Andres Freund wrote: > Hi, > > I've had a couple cases where tap tests died, and I couldn't easily see > where / why. For development of a new test I found it useful to show > backtraces in that case - just adding a > use Carp::Always; > at the start of the relevant

[HACKERS] Show backtrace when tap tests fail

2017-09-19 Thread Andres Freund
Hi, I've had a couple cases where tap tests died, and I couldn't easily see where / why. For development of a new test I found it useful to show backtraces in that case - just adding a use Carp::Always; at the start of the relevant module did the trick. I'm wondering if we shouldn't always do so