1 Test programs and libraries for libpq
3 If you have Test::Differences installed, any differences in the trace files
4 are displayed in a format that's easier to read than the standard format.
5 =====================================
7 This module was developed to test libpq's "pipeline" mode, but it can
8 be used for any libpq test that requires specialized C code.
10 "make check" will run all the tests in the module against a temporary
13 You can manually run a specific test by running:
15 ./libpq_pipeline <name of test> [ <connection string> ]
17 This will not start a new server, but rather connect to the server
18 specified by the connection string, or your default server if you
19 leave that out. To discover the available test names, run:
21 ./libpq_pipeline tests
23 To add a new test to this module, you need to edit libpq_pipeline.c.
24 Add a function to perform the test, and arrange for main() to call it
25 when the name of your new test is passed to the program. Don't forget
26 to add the name of your test to the print_test_list() function, else
27 the TAP test won't run it.
29 If the order in which Postgres protocol messages are sent is deterministic
30 in your test, you should arrange for the message sequence to be verified
31 by the TAP test. First generate a reference trace file, using a command
34 ./libpq_pipeline -t traces/mynewtest.trace mynewtest
36 Then add your test's name to the list in the $cmptrace definition in the
37 t/001_libpq_pipeline.pl file. Run "make check" a few times to verify
38 that the trace output actually is stable.