pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@postgresql.org
Subject: pgsql: Improve logging of TAP tests.
Date: Thu, 09 Jul 2015 10:27:19 +0000
Message-ID: <E1ZD931-0000lN-J4@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Improve logging of TAP tests.

Create a log file for each test run. Stdout and stderr of the test script,
as well as any subprocesses run as part of the test, are redirected to
the log file. This makes it a lot easier to debug test failures. Also print
the test output (ok 12 - ... messages) to the log file, and the command
line of any external programs executed with the system_or_bail and run_log
functions. This makes it a lot easier to debug failing tests.

Modify some of the pg_ctl and other command invocations to not use 'silent'
or 'quiet' options, and don't redirect output to /dev/null, so that you get
all the information in the log instead.

In the passing, construct some command lines in a way that works if $tempdir
contains quote-characters. I haven't systematically gone through all of
them or tested that, so I don't know if this is enough to make that work.

pg_rewind tests had a custom mechanism for creating a similar log file. Use
the new generic facility instead.

Michael Paquier and me.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/1ea06203b82b98b5098808667f6ba652181ef5b2

Modified Files
--------------
src/Makefile.global.in                         |    1 +
src/bin/pg_basebackup/t/010_pg_basebackup.pl   |    2 +-
src/bin/pg_controldata/t/001_pg_controldata.pl |    2 +-
src/bin/pg_ctl/t/001_start_stop.pl             |    2 +-
src/bin/pg_ctl/t/002_status.pl                 |    4 +-
src/bin/pg_rewind/.gitignore                   |    1 -
src/bin/pg_rewind/Makefile                     |    2 +-
src/bin/pg_rewind/RewindTest.pm                |   85 ++++++++--------------
src/bin/pg_rewind/t/001_basic.pl               |    1 -
src/bin/pg_rewind/t/002_databases.pl           |    1 -
src/bin/pg_rewind/t/003_extrafiles.pl          |    1 -
src/test/perl/SimpleTee.pm                     |   27 +++++++
src/test/perl/TestLib.pm                       |   93 +++++++++++++++++++-----
src/test/ssl/ServerSetup.pm                    |    6 +-
14 files changed, 143 insertions(+), 85 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


view thread (9+ messages)  latest in thread

Message-ID: <E1ZD931-0000lN-J4@gemulon.postgresql.org>
Permalink:  ../E1ZD931-0000lN-J4@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ZD931-0000lN-J4@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: heikki.linnakangas@iki.fi
  Subject: Re: pgsql: Improve logging of TAP tests.
  In-Reply-To: <E1ZD931-0000lN-J4@gemulon.postgresql.org>
  References: <E1ZD931-0000lN-J4@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox