tests for client programs

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: tests for client programs
Date: 2014-01-15 05:30:31
Message-ID: 1389763831.28160.6.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

As we all know, the client programs (src/bin/) don't have any real test
suites. Some pieces are tested as part of the backend regression tests,
some as part of the pg_upgrade test script, but nothing is specifically
targeted, and pg_basebackup for example is not tested at all.

So I wrote something.

I chose to use Perl-based tools, prove and Test::More, because those are
available in a standard Perl installation, and we already require that.

I put together three handfuls of tests to show what it would look like.
For extra fun, I added a "todo" test in pg_basebackup for a feature
that's currently being proposed in the commit fest.

A significant near-future project would be adding tests for pg_dump and
pg_upgrade.

Lots of things to argue about here: tools, file layout, naming, Perl
code, test quality, etc.

To try it out, apply the attached patch and run make -C src/bin check
(or installcheck, after installation).

Attachment Content-Type Size
0001-Add-TAP-tests-for-client-programs.patch text/x-patch 31.7 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2014-01-15 05:31:42 Re: CREATE TABLESPACE WITH
Previous Message Pavan Deolasee 2014-01-15 05:21:34 Re: WAL Rate Limiting