summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorAndrew Dunstan2021-10-22 13:11:52 +0000
committerAndrew Dunstan2021-10-22 13:49:07 +0000
commitf4ce6c4d3a30ec3a12c7f64b90a6fc82887ddd7b (patch)
tree8c1b4b8e9263af041fa4e2d98d68a508e0b227f2 /src/tools
parentb1ce6c284366ce1dae120f5d10dd59e8804322ee (diff)
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]
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/msvc/vcregress.pl3
1 files changed, 3 insertions, 0 deletions
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);