Re: PG_TEST_EXTRA and meson - Mailing list pgsql-hackers

From Jacob Champion
Subject Re: PG_TEST_EXTRA and meson
Date
Msg-id CAOYmi+nsGC1e68_6UV1NQ_Ms4O2fFfc49r53=w1UaoYXyH4K0A@mail.gmail.com
Whole thread Raw
In response to Re: PG_TEST_EXTRA and meson  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
Responses Re: PG_TEST_EXTRA and meson
List pgsql-hackers
On Fri, Aug 9, 2024 at 2:26 AM Ashutosh Bapat
<ashutosh.bapat.oss@gmail.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



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: CSN snapshots in hot standby
Next
From: Jacob Champion
Date:
Subject: Re: [PoC] Federated Authn/z with OAUTHBEARER