pgsql: Add TAP tests for pg_dump

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add TAP tests for pg_dump
Date: 2016-05-06 18:06:59
Message-ID: E1ayk9T-0000Tq-2P@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Add TAP tests for pg_dump

This TAP test suite will create a new cluster, populate it based on
the 'create_sql' values in the '%tests' hash, run all of the runs
defined in the '%pgdump_runs' hash, and then for each test in the
'%tests' hash, compare each run's output the the regular expression
defined for the test under the 'like' and 'unlike' functions, as
appropriate.

While this test suite covers a fair bit of ground (67% of pg_dump.c
and quite a bit of the other files in src/bin/pg_dump), there is
still quite a bit which remains to be added to provide better code
coverage. Still, this is quite a bit better than we had, and has
found a few bugs already (note that the CREATE TRANSFORM test is
commented out, as it is currently failing).

Idea for using the TAP system from Tom, though all of the code is mine.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/6bd356c33a3cf3a49313dc8638ea4bb066c4cf37

Modified Files
--------------
src/bin/pg_dump/Makefile | 3 +
src/bin/pg_dump/pg_dump.c | 2 +-
src/bin/pg_dump/t/001_basic.pl | 42 +
src/bin/pg_dump/t/002_pg_dump.pl | 2859 ++++++++++++++++++++
src/test/modules/Makefile | 1 +
src/test/modules/test_pg_dump/.gitignore | 4 +
src/test/modules/test_pg_dump/Makefile | 25 +
src/test/modules/test_pg_dump/README | 2 +
.../modules/test_pg_dump/expected/test_pg_dump.out | 6 +
src/test/modules/test_pg_dump/sql/test_pg_dump.sql | 1 +
src/test/modules/test_pg_dump/t/001_base.pl | 535 ++++
.../modules/test_pg_dump/test_pg_dump--1.0.sql | 15 +
src/test/modules/test_pg_dump/test_pg_dump.control | 3 +
13 files changed, 3497 insertions(+), 1 deletion(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2016-05-06 18:40:43 pgsql: Use mul_size when multiplying by the number of parallel workers.
Previous Message Peter Eisentraut 2016-05-06 18:02:57 pgsql: Update config.guess and config.sub

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2016-05-06 18:07:36 Re: SET ROLE and reserved roles
Previous Message Robert Haas 2016-05-06 17:59:06 Re: Segmentation fault when max_parallel degree is very High