Add module build directory to the PATH for TAP tests

For non-MSVC builds this is make's $(CURDIR), while for MSVC builds it
is $topdir/$Config/$module. The directory is added as the second element
in the PATH, so that the install location takes precedence, but the
added PATH element takes precedence over the rest of the PATH.

The reason for this is to allow tests to find built products that are
not installed, such as the libpq_pipeline test driver.

The libpq_pipeline test is adjusted to take advantage of this.

Based on a suggestion from Andres Freund.

Backpatch to release 14.

Discussion: 
https://postgr.es/m/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f4ce6c4d3a30ec3a12c7f64b90a6fc82887ddd7b

Modified Files
--------------
src/Makefile.global.in                                  | 10 +++++-----
src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl |  7 +++----
src/tools/msvc/vcregress.pl                             |  3 +++
3 files changed, 11 insertions(+), 9 deletions(-)

Reply via email to