Re: [COMMITTERS] pgsql: Refactor Perl test code - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [COMMITTERS] pgsql: Refactor Perl test code
Date
Msg-id CAB7nPqTEgZM9jOfjp-wBLVWJW1f_qFGVrDZOyA3JHqiDH=ZYHw@mail.gmail.com
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Refactor Perl test code  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [COMMITTERS] pgsql: Refactor Perl test code
List pgsql-hackers
On Thu, Dec 3, 2015 at 12:19 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> BTW, not the fault of this patch in particular, but this example points
> up the complaint I've had right along about how opaque TAP test failures
> are.  How did you dig down to see that error message?

Well, it showed up on my terminal...

> Is it even possible to diagnose such a failure from what the buildfarm logs?

Yes. If you look at TestLib.pm, stderr/stdout redirection is done in
an INIT block, not BEGIN block, and INIT gets executed *after* the
code is compiled. FWIW, I recall arguing in favor of adding this
redirection logic in BEGIN so as we could get compilation errors
directly in the log files... The reason why it is done this way is
that it has been argued as well that we should not change the FS in
the BEGIN block, but in the INIT block when TestLib.pm is loaded.
-- 
Michael



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Fwd: Another little thing about psql wrapped expanded output
Next
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Refactor Perl test code