]> granicus.if.org Git - postgresql/commit
Add TAP tests for pg_dump
authorStephen Frost <sfrost@snowman.net>
Fri, 6 May 2016 18:06:50 +0000 (14:06 -0400)
committerStephen Frost <sfrost@snowman.net>
Fri, 6 May 2016 18:06:50 +0000 (14:06 -0400)
commit6bd356c33a3cf3a49313dc8638ea4bb066c4cf37
tree3c8fed739af89c36a4fcd3ed40d79c4a4cc399a5
parente1b120a8cbb0f39a79926fd173f33e57202cdfa0
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.
13 files changed:
src/bin/pg_dump/Makefile
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/t/001_basic.pl [new file with mode: 0644]
src/bin/pg_dump/t/002_pg_dump.pl [new file with mode: 0644]
src/test/modules/Makefile
src/test/modules/test_pg_dump/.gitignore [new file with mode: 0644]
src/test/modules/test_pg_dump/Makefile [new file with mode: 0644]
src/test/modules/test_pg_dump/README [new file with mode: 0644]
src/test/modules/test_pg_dump/expected/test_pg_dump.out [new file with mode: 0644]
src/test/modules/test_pg_dump/sql/test_pg_dump.sql [new file with mode: 0644]
src/test/modules/test_pg_dump/t/001_base.pl [new file with mode: 0644]
src/test/modules/test_pg_dump/test_pg_dump--1.0.sql [new file with mode: 0644]
src/test/modules/test_pg_dump/test_pg_dump.control [new file with mode: 0644]