Re: meson and check-tests

From: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: jian he <jian(dot)universality(at)gmail(dot)com>, Tristan Partin <tristan(at)partin(dot)io>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: meson and check-tests
Date: 2024-11-19 13:13:29
Message-ID: CAN55FZ3RzZj7fXzJskRRwxJ7LX2JAyfnG-dE2d0qAaorMSS7hA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Thanks for checking it!

On Tue, 19 Nov 2024 at 15:19, Ashutosh Bapat
<ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
>
> On Thu, Oct 31, 2024 at 11:28 PM Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> wrote:
> >
> > Yes, that is exactly why we have both '--schedule' and '--tests'
> > flags. Also, a comment is added to clarify this.
>
> The comment is useful if we want to understand this change but I feel
> it's confusing when reading the code. I don't think we need the
> comment. The code is clearer than before as is.

I got it, the comment is removed.

> > > It might be better to make this explicit in the code -- by making sure
> > > that only one of them is passed and writing a comment about it.
> > > ArgumentParser might have some trick to specify that passing both the
> > > arguments is an error.
> >
> > I did not understand why only one of them needed to be passed at a
> > time. For example in ecpg tests
> > (src/interfaces/ecpg/test/meson.build), both '--schedule' and
> > '--tests' options are passed.
>
> Is it because it has both schedule as well as sql?
> 'ecpg': {
> 'expecteddir': meson.current_source_dir(),
> 'inputdir': meson.current_build_dir(),
> 'schedule': ecpg_test_files,
> 'sql': [
> 'sql/twophase',
> ],
>
> I see sql/twophase is not part of ecpg_schedule and it's passes
> separately to testwrap.

Yes. All the tests without schedule option are collected in the
test_selection in the meson.build file:

test_selection = []
if kind == 'isolation'
test_selection += t.get('specs', [])
else
test_selection += t.get('sql', [])
endif

And, AFAIU all the regression test suites accept both schedule option
and tests by their names. So, it should be safe to pass both
--schedule and --tests.

--
Regards,
Nazir Bilal Yavuz
Microsoft

Attachment Content-Type Size
v6-0001-Add-make-check-tests-behavior-to-the-meson-based-.patch text/x-patch 3.6 KB
v6-0002-Expand-test-selection-behavior-to-all-test-types-.patch text/x-patch 1.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2024-11-19 13:22:43 Re: Support for NO INHERIT to INHERIT state change with named NOT NULL constraints
Previous Message Nazir Bilal Yavuz 2024-11-19 13:12:46 Re: meson and check-tests