]> granicus.if.org Git - postgresql/commit
Improve logging of TAP tests.
authorAndrew Dunstan <andrew@dunslane.net>
Tue, 28 Jul 2015 16:22:21 +0000 (12:22 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Tue, 28 Jul 2015 16:22:21 +0000 (12:22 -0400)
commitfa4a4df93c8c28d5684cacb1677fbd13f58bb9f2
treeec357e9f9627f48fec80aa2855e558e4763ab960
parentbeebb259d2a994cd2021a1506b7af1716b16f476
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 Heikki Linnakangas.

This is a backpatch of Heikki's commit 1ea06203b82b98b5098808667f6ba652181ef5b2.
14 files changed:
src/Makefile.global.in
src/bin/pg_basebackup/t/010_pg_basebackup.pl
src/bin/pg_controldata/t/001_pg_controldata.pl
src/bin/pg_ctl/t/001_start_stop.pl
src/bin/pg_ctl/t/002_status.pl
src/bin/pg_rewind/.gitignore
src/bin/pg_rewind/Makefile
src/bin/pg_rewind/RewindTest.pm
src/bin/pg_rewind/t/001_basic.pl
src/bin/pg_rewind/t/002_databases.pl
src/bin/pg_rewind/t/003_extrafiles.pl
src/test/perl/SimpleTee.pm [new file with mode: 0644]
src/test/perl/TestLib.pm
src/test/ssl/ServerSetup.pm