Re: PG_TEST_EXTRA and meson - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: PG_TEST_EXTRA and meson
Date
Msg-id CAExHW5uG2jA34iJKcz-N0gZutkYjROwBO+GD_pnXbO3jT8=+AA@mail.gmail.com
Whole thread Raw
In response to Re: PG_TEST_EXTRA and meson  (Jacob Champion <jacob.champion@enterprisedb.com>)
Responses Re: PG_TEST_EXTRA and meson
Re: PG_TEST_EXTRA and meson
List pgsql-hackers
Hi Jacob,

On Tue, Jul 23, 2024 at 7:54 PM Jacob Champion
<jacob.champion@enterprisedb.com> wrote:
>
> On Tue, Jul 23, 2024 at 3:32 AM Nazir Bilal Yavuz <byavuz81@gmail.com> wrote:
> > Upthread Jacob said he could work on a patch about introducing the
> > PG_TEST_EXTRA configure option to make builds. Would you still be
> > interested in working on this? If not, I would gladly work on it.
>
> Sure! Attached is a minimalist approach using AC_ARG_VAR.
>
> It works for top-level `make check-world`, or `make check -C
> src/test`. If you run `make check` directly from a test subdirectory,
> the variable doesn't get picked up, because it's only exported from
> the src/test level as of your patch c3382a3c3cc -- but if that turns
> out to be a problem, we can plumb it all the way down or expand the
> scope of the export.

Sorry for the delay in reply.

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
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.
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 this the patch lacks overriding PG_TEST_EXTRA at run time.

AFAIU, following was expected behaviour from both meson and make.
Please correct if I am wrong.
1. If PG_TEST_EXTRA is set at the setup/configuration time, it is not
required to be set at run time.
2. Runtime PG_TEST_EXTRA always overrides configure time PG_TEST_EXTRA.
--
Best Wishes,
Ashutosh Bapat



pgsql-hackers by date:

Previous
From: Kirill Reshke
Date:
Subject: Re: [Patch] remove duplicated smgrclose
Next
From: Michael Banck
Date:
Subject: Re: Improve error message for ICU libraries if pkg-config is absent