On 06/25/2015 07:14 AM, Michael Paquier wrote:
> After looking at the issues with the TAP test suite that hamster faced
> a couple of days ago, which is what has been discussed on this thread:
> http://www.postgresql.org/message-id/13002.1434307025@sss.pgh.pa.us
>
> I have developed a patch to improve log capture of the TAP tests by
> being able to collect stderr and stdout output of each command run in
> the tests by using more extensively IPC::Run::run (instead of system()
> that is not able to help much) that has already been sent on the
> thread above.
This is a massive improvement to the usability of TAP tests. They are
practically impossible to debug currently. Thanks for working on this!
The patch redirects the output of all "system_or_bail" commands to a log
file. That's a good start, but I wish we could get *everything* in the
same log file. That includes also:
* stdout and stderr of *all* commands. Including all the commands run
with command_ok/command_fails.
* the command line of commands being executed. It's difficult to follow
the log when you don't know which output corresponds to which command.
* whenever a test case is reported as success/fail.
Looking at the manual page of Test::More, it looks like you could change
where the perl script's STDOUT and STDERR point to, because Test::More
takes a copy of them (when? at program startup I guess..). That would be
much more convenient than decorating every run call with ">> logfile".
- Heikki