Re: PG_TEST_EXTRA and meson

From: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>, Tristan Partin <tristan(at)partin(dot)io>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: PG_TEST_EXTRA and meson
Date: 2024-08-13 20:54:24
Message-ID: CAOYmi+nsGC1e68_6UV1NQ_Ms4O2fFfc49r53=w1UaoYXyH4K0A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 9, 2024 at 2:26 AM Ashutosh Bapat
<ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
> Here are my observations with the patch applied
> 1. If I run configure without setting PG_TEST_EXTRA, it won't run the
> tests that require PG_TEST_EXTRA to be set. This is expected.
> 2. But it wont' run tests even if PG_TEST_EXTRA is set while running
> make check.- that's unexpected

(see below)

> 3. If I run configure with PG_TEST_EXTRA set and run 'make check' in
> the test directory, it runs those tests. That's expected from the
> final patch but that doesn't seem to be what you described above.

I'm not entirely sure what you mean? src/test should work fine,
anything lower than that (say src/test/ssl) does not.

> 3. After 3, if I run `PG_TEST_EXTRA="something" make check`, it still
> runs those tests. So it looks like PG_TEST_EXTRA doesn't get
> overridden. If PG_TEST_EXTRA is set to something other than what was
> configured, it doesn't take effect when running the corresponding
> tests. E.g. PG_TEST_EXTRA is set to xid_wraparound at configure time,
> but `PG_TEST_EXTRA=wal_consistency_check make check ` is run, the
> tests won't use wal_consistency_check=all. - that's not expected.

I think you're running into the GNU Make override order [1]. For
instance when I want to override PG_TEST_EXTRA, I write

make check PG_TEST_EXTRA=whatever

If you want the environment variable to work by default instead, you can do

PG_TEST_EXTRA=whatever make check -e

If you don't want devs to have to worry about the difference, I think
we can change the assignment operator to `?=` in Makefile.global.in.

Thanks,
--Jacob

[1] https://www.gnu.org/software/make/manual/html_node/Environment.html

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2024-08-13 21:11:56 Re: [PoC] Federated Authn/z with OAUTHBEARER
Previous Message Heikki Linnakangas 2024-08-13 20:13:39 Re: CSN snapshots in hot standby