pgsql: Add TAP tests for pg_dump - Mailing list pgsql-committers

From Stephen Frost
Subject pgsql: Add TAP tests for pg_dump
Date
Msg-id E1ayk9T-0000Tq-2P@gemulon.postgresql.org
Whole thread Raw
Responses Re: pgsql: Add TAP tests for pg_dump
Re: pgsql: Add TAP tests for pg_dump
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Stephen Frost
Date:
Subject: pgsql: Correct pg_dump WHERE clause for functions/aggregates
Next
From: Stephen Frost
Date:
Subject: pgsql: Only issue LOCK TABLE commands when necessary