Re: PG_TEST_EXTRA and meson

From: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: Jacob Champion <jacob(dot)champion(at)enterprisedb(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-28 15:15:56
Message-ID: CAN55FZ0iK3Wh2SmZxKAV_sD_mjWvd1hEe6JYaeddEKKnL14_hQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Wed, 28 Aug 2024 at 16:41, Ashutosh Bapat
<ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
>
> On Wed, Aug 28, 2024 at 5:26 PM Ashutosh Bapat
> <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
> >
> > On Fri, Aug 23, 2024 at 9:55 PM Jacob Champion
> > <jacob(dot)champion(at)enterprisedb(dot)com> wrote:
> > >
> > > On Fri, Aug 23, 2024 at 5:59 AM Ashutosh Bapat
> > > <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
> > > > If I run
> > > > export PG_TEST_EXTRA=xid_wraparound; ./configure --prefix=$BuildDir
> > > > --enable-tap-tests && make -j4 && make -j4 install; unset
> > > > PG_TEST_EXTRA
> > > > followed by
> > > > make -C $XID_MODULE_DIR check where
> > > > XID_MODULE_DIR=src/test/modules/xid_wraparound - it skips the tests.
> > >
> > > Right.
> > >
> > > > I thought this was working before.
> > >
> > > No, that goes back to my note in [1] -- as of c3382a3c3cc, the
> > > variable was exported at only the src/test level, and I wanted to get
> > > input on that so we could decide on the next approach if needed.
>
> I had an offline discussion with Jacob. Because of c3382a3c3cc, `make
> -C src/test/modules/xid_wraparound check` will skip xid_wraparound
> tests. It should be noted that when that commit was added well before
> the xid_wraparound tests were added. But I don't know whether the
> tests controlled by PG_TEST_EXTRA could be run using make -C that
> time.

I did not test but I think they could not be run because of the same
reason as below.

> Anyway, I think, supporting PG_TEST_EXTRA at configure time without
> being able to run tests using `make -C <test directory> ` is not that
> useful. It only helps make check-world but not when running individual
> tests.
>
> Nazir, since you authored c3382a3c3cc, can you please provide input
> that Jacob needs?

I think the problem is that we define PG_TEST_EXTRA in the
Makefile.global file but we do not export it there, instead we export
in the src/test/Makefile. But when you run tests from their Makefiles,
they do not include src/test/Makefile (they include Makefile.global);
so they can not get the PG_TEST_EXTRA env variable. Exporting
PG_TEST_EXTRA in the Makefile.global should solve the problem.

Also, I think TEST 110 and 170 do not look correct to me. In the
current way, we do not pass PG_TEST_EXTRA to the make command.

110 should be:
'cd $XID_MODULE_DIR && PG_TEST_EXTRA=xid_wraparound make check'
instead of 'PG_TEST_EXTRA=xid_wraparound cd $XID_MODULE_DIR && make
check'

170 should be:
'cd $XID_MODULE_DIR && PG_TEST_EXTRA="" make check && cd $PGDir'
instead of 'PG_TEST_EXTRA="" cd $XID_MODULE_DIR && make check && cd
$PGDir'

--
Regards,
Nazir Bilal Yavuz
Microsoft

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nazir Bilal Yavuz 2024-08-28 15:21:08 Re: PG_TEST_EXTRA and meson
Previous Message Jacob Champion 2024-08-28 15:11:17 Re: PG_TEST_EXTRA and meson