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 1mdEV1-0003c8-BT for pgsql-committers@arkaria.postgresql.org; Wed, 20 Oct 2021 16:31:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mdEUy-0000dn-Re for pgsql-committers@arkaria.postgresql.org; Wed, 20 Oct 2021 16:31:28 +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 1mdEUy-0000de-L9 for pgsql-committers@lists.postgresql.org; Wed, 20 Oct 2021 16:31:28 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mdEUw-0005Bb-Ku for pgsql-committers@lists.postgresql.org; Wed, 20 Oct 2021 16:31:27 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 0B5975C0166; Wed, 20 Oct 2021 12:31:26 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 20 Oct 2021 12:31:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=mjmndTvLJa4prSB0cAjy2TFNhf8 l+MQ4bbsFec52Dnc=; b=saFWxeGhwtWByepo+MFInnozHr8x2mU748RzyZsi/c1 LCtgJ9hteJpcCDY1R/8pj4eOHZUJGo01RX1dP/nRikfdIIuoAfVLjXIuw0qCAXST 0+UNMD/N39IivVAoAPmCr9DJn7fksfNusszGIODNaa0JLRRFFIGQnvLQKJbRCvm+ THzYDrDICgAZU+KbS2vRZbyfkUiCboT7y7e2NRBM4+o9jo0jTbc6esMiaxPl+vKq gLD2V7ffLMGQ1L5cbz5VN0Bg/L0VctOUO4YlqfEG37RzQyXQqxEjzuTlq9KJuRzv hl2TdakCLzgnj5WwbQZeC4KCJyFkOqeQNpHA0q/OD/Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=mjmndT vLJa4prSB0cAjy2TFNhf8l+MQ4bbsFec52Dnc=; b=EOX0//H8sTnMsd5zrFWBzl kUh4lAdrjSjbYRTvHSo6EPMGkznwYVysNDYLAcR0XM1vHv0Ig0jUBBKR1hf1eeBO h4AC3RYlSqlau6oHvUwzVWXbB21TwZRxRFae/ZofHX6poXEYLyq8KUncBV37tv2Z rZHgn5DL9CkoFK18PnwBYUOJOpfUMW0dwE1WmIimABdO4AOqeIDDAHq68nDKR4XX c56l8w0Mo2PSMVR8V2X1IEZMF0frw/1nKDPm704UOB7/74pG1RuRs4Pu1axLaGw9 XahWrZ9SF96vyF19/E+JTh7qL4iob6ePxU70v4u4shuHZ+JKZyJzagewSubi3I/w == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddvgedgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpedukefhkeelueegveetheelffffjeegleeuudelfeefuedtleffueejfffh ueffudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 20 Oct 2021 12:31:24 -0400 (EDT) Date: Wed, 20 Oct 2021 09:31:23 -0700 From: Andres Freund To: Andrew Dunstan Cc: Alvaro Herrera , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Reference test binary using TESTDIR in 001_libpq_pipeline.pl. Message-ID: <20211020163123.adogznqee7oosvj5@alap3.anarazel.de> References: <202110181423.cmd34pruwlry@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2021-10-18 11:39:08 -0400, Andrew Dunstan wrote: > On 10/18/21 10:23 AM, Alvaro Herrera wrote: > > On 2021-Oct-17, Andrew Dunstan wrote: > > > >> +sub find_built_program > >> +{ > >> + my $program = shift; > >> + my $path; > >> + > >> + if (defined $ENV{MSBUILDDIR}) > >> + { > >> + # vcregress.pl sets MSBUILDDIR which is the root of all the build dirs > >> + my $wanted = sub { $_ eq "$program.exe" && $path = $File::Find::name;}; > >> + File::Find::find($wanted,$ENV{MSBUILDDIR}); > >> + } > > Hmm, it seems weird to have to use File::Find when we already know where > > the program is, right? I mean, per your previous patch, we know that > > the program is in $MSBUILDDIR/libpq_pipeline/libpq_pipeline.exe, so why > > don't we make this one be > > > > if (defined $ENV{MSBUILDDIR}) > > { > > return $ENV{MSBUILDDIR} . "$program/$program.exe"; > > } > > > Could do, but say the module had two programs? Mostly we don't do that > but Release/pg_isolation_regress has two executables, so it's more than > just theoretically possible. 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? Greetings, Andres Freund