On Wed, January 15, 2014 06:30, Peter Eisentraut wrote: > As we all know, the client programs (src/bin/) don't have any real test > > So I wrote something. > > I chose to use Perl-based tools, prove and Test::More, because those are
> [ 0001-Add-TAP-tests-for-client-programs.patch ] 32 k I gave this a quick try. Centos 6.5 final / perl 5.18.2 As mentioned earlier I had to install IPC::Run. 2 tests stumbled: 1. One test ( pg_ctl/t/001_start_stop.pl ) failed because I had PGDATA set. I unset all PG+ vars after that. No a big problem but nonetheless it might be better if the test suite removes /controls the variables before running. 2. The pg_isready test failed command_fails() ('fails with no server running') because it defaults to the compiled-in server-port (and that server was running). I added the test-designated port (65432, as defined in TestLib.pm). This simple change is in the attached patch. With these two changes the whole test suite passed. Thanks, Erik Rijkers
--- src/bin/scripts/t/080_pg_isready.pl.orig 2014-01-15 20:08:16.325916223 +0100 +++ src/bin/scripts/t/080_pg_isready.pl 2014-01-15 20:18:24.705927054 +0100 @@ -7,7 +7,7 @@ program_version_ok('pg_isready'); program_options_handling_ok('pg_isready'); -command_fails(['pg_isready'], 'fails with no server running'); +command_fails(['pg_isready', '-p65432'], 'fails with no server running'); my $tempdir = tempdir; start_test_server $tempdir;
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers