Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mdGMd-0000Sw-Vx for pgsql-committers@arkaria.postgresql.org; Wed, 20 Oct 2021 18:30:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mdGMc-0006gE-PJ for pgsql-committers@arkaria.postgresql.org; Wed, 20 Oct 2021 18:30:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mdGMc-0006g2-J5 for pgsql-committers@lists.postgresql.org; Wed, 20 Oct 2021 18:30:58 +0000 Received: from relay10.mail.gandi.net ([217.70.178.230]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mdGMZ-00061n-Q5 for pgsql-committers@lists.postgresql.org; Wed, 20 Oct 2021 18:30:57 +0000 Received: (Authenticated sender: adsend@dunslane.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 7426B240003; Wed, 20 Oct 2021 18:30:50 +0000 (UTC) Subject: Re: pgsql: Reference test binary using TESTDIR in 001_libpq_pipeline.pl. To: Andres Freund Cc: Alvaro Herrera , pgsql-committers@lists.postgresql.org References: <202110181423.cmd34pruwlry@alvherre.pgsql> <20211020163123.adogznqee7oosvj5@alap3.anarazel.de> From: Andrew Dunstan Message-ID: <1ccbc9a2-1e0f-93bf-745d-99b3409e10ae@dunslane.net> Date: Wed, 20 Oct 2021 14:30:49 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20211020163123.adogznqee7oosvj5@alap3.anarazel.de> Content-Type: multipart/mixed; boundary="------------BE3942D89848C3A7FE9F7DF3" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------BE3942D89848C3A7FE9F7DF3 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 10/20/21 12:31 PM, Andres Freund wrote: > > ISTM that we should just make the "test invocation framework" responsible to > put the relevant directory onto PATH? I.e. Makefile.global should add the > build directory of the test to PATH, and vcregress.pl should put the relevant > $configuration/$project/ directory there? > Like this? That seems reasonable. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com --------------BE3942D89848C3A7FE9F7DF3 Content-Type: text/x-patch; charset=UTF-8; name="libpq_pipeline_fix3.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="libpq_pipeline_fix3.patch" diff --git a/src/Makefile.global.in b/src/Makefile.global.in index a1da1ea4ee..2f6b7ad561 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -449,8 +449,8 @@ define prove_installcheck rm -rf '$(CURDIR)'/tmp_check $(MKDIR_P) '$(CURDIR)'/tmp_check cd $(srcdir) && \ - TESTDIR='$(CURDIR)' PATH="$(bindir):$$PATH" PGPORT='6$(DEF_PGPORT)' \ - top_builddir='$(CURDIR)/$(top_builddir)' \ + TESTDIR='$(CURDIR)' PATH="$(CURDIR):$(bindir):$$PATH" \ + PGPORT='6$(DEF_PGPORT)' top_builddir='$(CURDIR)/$(top_builddir)' \ PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress' \ $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) $(if $(PROVE_TESTS),$(PROVE_TESTS),t/*.pl) endef diff --git a/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl b/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl index 6721edfa71..d1d321ff8f 100644 --- a/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl +++ b/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl @@ -14,9 +14,8 @@ $node->init; $node->start; my $numrows = 700; -my $libpq_pipeline = "$ENV{TESTDIR}/libpq_pipeline"; -my ($out, $err) = run_command([ $libpq_pipeline, 'tests' ]); +my ($out, $err) = run_command([ 'libpq_pipeline', 'tests' ]); die "oops: $err" unless $err eq ''; my @tests = split(/\s+/, $out); diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index 35e8f67f01..785d908edd 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -248,6 +248,8 @@ sub tap_check $ENV{REGRESS_SHLIB} = "$topdir/src/test/regress/regress.dll"; $ENV{TESTDIR} = "$dir"; + my $module = basename $dir; + $ENV{PATH} = "$topdir/$Config/$module;$ENV{PATH}"; rmtree('tmp_check'); system(@args); --------------BE3942D89848C3A7FE9F7DF3--