From f4ce6c4d3a30ec3a12c7f64b90a6fc82887ddd7b Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Fri, 22 Oct 2021 09:11:52 -0400 Subject: 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/4941f5a5-2d50-1a0e-6701-14c5fefe92d6@dunslane.net --- src/tools/msvc/vcregress.pl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/tools') diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index 35e8f67f013..fc826da3ff2 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -248,6 +248,9 @@ sub tap_check $ENV{REGRESS_SHLIB} = "$topdir/src/test/regress/regress.dll"; $ENV{TESTDIR} = "$dir"; + my $module = basename $dir; + # add the module build dir as the second element in the PATH + $ENV{PATH} =~ s!;!;$topdir/$Config/$module;!; rmtree('tmp_check'); system(@args); -- cgit v1.2.3