Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tndpV-0074PU-RK for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Feb 2025 13:21:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tndpT-00EVkX-VA for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Feb 2025 13:21:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tndpT-00EVh5-2d for pgsql-hackers@lists.postgresql.org; Thu, 27 Feb 2025 13:21:31 +0000 Received: from fout-b4-smtp.messagingengine.com ([202.12.124.147]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tndpP-000OGq-0Y for pgsql-hackers@postgresql.org; Thu, 27 Feb 2025 13:21:30 +0000 Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfout.stl.internal (Postfix) with ESMTP id E437E11400D4; Thu, 27 Feb 2025 08:21:24 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Thu, 27 Feb 2025 08:21:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1740662484; x=1740748884; bh=2nqKklfRbr wFVfTflGanHofLSY1Wk1b8EFtjsmXm868=; b=kLuiXDom8QSmncjGu7VTyMqXUs CClvP6n8l/dc114ATnoeRd+vuCbARVI8hX+SSh95+QKk32KNlzaBM47rtYLzyDQO uv7n+B7lGZevDDojFvWgJwJTLCWT84yEpsj0chKOxbLwe/5RVoMh91uOSeJKDihR KgEZTYb6LYivNp8bfjPQbyuiOk5TmPc22D/mYOcp/5YAIwyf3G+rANyx9rR8Qaqk SeHMZITDU6Jwgml+CQHfQglC8m2vz/E/cHiPLblm3GVPaR/8yNSsSIUiJ03G/SV9 SuKYSl8upKV8l27lEPARFpqyf9tGGvF/BdhP2S1v4RNr971F9JiPp7cV4cWQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1740662484; x=1740748884; bh=2nqKklfRbrwFVfTflGanHofLSY1Wk1b8EFt jsmXm868=; b=3sBaLWFYIXicNNHc51EybjoQLrdadO2VB+85r59DN+tWUwjaWKG XHB8GNtpd+BsFJs6BUsX649KTsXlDxQxvz4J38kSP6vjXukiDaGBkOWbE6XElJuo GMzgtZ1nizD4hxPuHhzbJGExYME9bATsAnY5hTjMebwp8TaSgfw6zUivpaA8o/U6 jEMimLlurLw9Dm30t4wsFn0SI+oiirtbxkeSz3PH+Eu8p0q/uqEzJK+Kla7NaqOe zJRjPmq1VQzZteSXZJY/AUFNcRr+3aCsmY5Hdnx0xfdapQHXF+Vm1LlspwPw4ttu 80O3vcy2OK1edTYstH5W/pdd1hXg7r+2ZzA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdekjeehjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpeffhffvvefukfhfgggtuggjsehttdfstddttddv necuhfhrohhmpeetnhgurhgvshcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgrii gvlhdruggvqeenucggtffrrghtthgvrhhnpeettdekfeffueduueefieffkeegueejgfet feevhfdugeelheeiueeffffhhefghfenucffohhmrghinhepghhithhhuhgsrdgtohhmne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghnughr vghssegrnhgrrhgriigvlhdruggvpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmth hpohhuthdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehpohhsthhgrhgvshhq lhdrohhrghdprhgtphhtthhopegrnhgurhgvrghssehprhhogigvlhdrshgv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 27 Feb 2025 08:21:23 -0500 (EST) Date: Thu, 27 Feb 2025 08:21:22 -0500 From: Andres Freund To: Andreas Karlsson Cc: pgsql-hackers Subject: Re: Add support for EXTRA_REGRESS_OPTS for meson Message-ID: References: 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 2025-02-27 13:53:17 +0100, Andreas Karlsson wrote: > We use EXTRA_REGRESS_OPTS to make sure the whole test suite passes with our > extension loaded and since I prefer develop in meson over using autotools > and make the lack of support for EXTRA_REGRESS_OPTS in meson > has bugged me for a while. Yep, we should add support for that. TEMP_CONFIG probably too. > Question: Would it make sense to rename it to PG_REGRESS_EXTRA_OPTS or > something similar while we already touch touch this code to make the various > options easier to remember? I'd not tackle that at the same time personally. > @@ -51,7 +52,12 @@ env_dict = {**os.environ, > if "PG_TEST_EXTRA" not in env_dict and args.pg_test_extra: > env_dict["PG_TEST_EXTRA"] = args.pg_test_extra > > -sp = subprocess.Popen(args.test_command, env=env_dict, stdout=subprocess.PIPE) > +if args.testname in ['regress', 'isolation', 'ecpg'] and 'EXTRA_REGRESS_OPTS' in env_dict: > + test_command = args.test_command + shlex.split(env_dict['EXTRA_REGRESS_OPTS']) > +else: > + test_command = args.test_command > + > +sp = subprocess.Popen(test_command, env=env_dict, stdout=subprocess.PIPE) > # Meson categorizes a passing TODO test point as bad > # (https://github.com/mesonbuild/meson/issues/13183). Remove the TODO > # directive, so Meson computes the file result like Perl does. This could I hacked up something similar before, for TEMP_CONFIG, and found that I needed to do something like this: +if 'TEMP_CONFIG' in os.environ and \ + args.testname in ['regress', 'isolation', 'ecpg']: + # be careful to insert before non-option args, otherwise it'll fail + # e.g. on windows + args.test_command.insert(1, '--temp-config='+os.environ['TEMP_CONFIG']) Greetings, Andres Freund