0001-Add-documentation-for-libpq_pipeline-tests.patch
application/octet-stream
Filename: 0001-Add-documentation-for-libpq_pipeline-tests.patch
Type: application/octet-stream
Part: 0
Patch
Format: format-patch
Series: patch 0001
Subject: Add documentation for libpq_pipeline tests
| File | + | − |
|---|---|---|
| src/test/modules/libpq_pipeline/README | 20 | 0 |
From 22a02899d47d46ed05ada2e38e3f9804981b96eb Mon Sep 17 00:00:00 2001 From: Jelte Fennema <jelte.fennema@microsoft.com> Date: Thu, 13 Jan 2022 15:26:35 +0100 Subject: [PATCH 1/2] Add documentation for libpq_pipeline tests This adds some explanation on how to run and add libpq tests. --- src/test/modules/libpq_pipeline/README | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/test/modules/libpq_pipeline/README b/src/test/modules/libpq_pipeline/README index d8174dd579..6eda6c5756 100644 --- a/src/test/modules/libpq_pipeline/README +++ b/src/test/modules/libpq_pipeline/README @@ -1 +1,21 @@ Test programs and libraries for libpq +===================================== + +You can manually run a specific test by running: + + ./libpq_pipeline <name of test> + +To add a new libpq test to this module you need to edit libpq_pipeline.c. There +you should add the name of your new test to the "print_test_list" function. +Then in main you should do something when this test name is passed to the +program. + +If the order in which postgres protocol messages are sent is deterministic for +your test. Then you can generate a trace of these messages using the following +command: + + ./libpq_pipeline mynewtest -t traces/mynewtest.trace + +Once you've done that you should make sure that when running "make check" +the generated trace is compared to the expected trace. This is done by adding +your test name to the $cmptrace definition in the t/001_libpq_pipeline.pl file -- 2.17.1