Re: meson and check-tests

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Tristan Partin <tristan(at)partin(dot)io>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: meson and check-tests
Date: 2024-06-02 04:05:40
Message-ID: CACJufxGSb7SYc3w4jLaLpB=Sx1feSWOnbqX2tv5X0nv8WZMcjg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jun 2, 2024 at 4:48 AM Tristan Partin <tristan(at)partin(dot)io> wrote:
>
> On Fri May 31, 2024 at 12:02 PM CDT, Ashutosh Bapat wrote:
> > Hi Tristan,
> > Using make I can run only selected tests under src/test/regress using
> > TESTS=... make check-tests. I didn't find any way to do that with meson.
> > meson test --suite regress runs all the regression tests.
> >
> > We talked this off-list at the conference. It seems we have to somehow
> > avoid passing pg_regress --schedule argument and instead pass the list of
> > tests. Any idea how to do that?
>
> I think there are 2 solutions to this.
>
> 1. Avoid passing --schedule by default, which doesn't sound like a great
> solution.
>
> 2. Teach pg_regress to ignore the --schedule option if specific tests
> are passed instead.
>
> 3. Add a --no-schedule option to pg_regress which would override the
> previously added --schedule option.
>
> I personally prefer 2 or 3.
>
> 2: meson test -C build regress/regress --test-args my_specific_test
> 3: meson test -C build regress/regress --test-args "--no-schedule my_specific_test"
>
> Does anyone have an opinion?
>

if each individual sql file can be tested separately, will
`test: test_setup`?
be aslo executed as a prerequisite?

in
# ----------
# The first group of parallel tests
# ----------
test: boolean char name varchar text int2 int4 int8 oid float4 float8
bit numeric txid uuid enum money rangetypes pg_lsn regproc

# ----------
# The second group of parallel tests
# multirangetypes depends on rangetypes
# multirangetypes shouldn't run concurrently with type_sanity
# ----------
test: strings md5 numerology point lseg line box path polygon circle
date time timetz timestamp timestamptz interval inet macaddr macaddr8
multirangetypes

If we can test each individual sql file via meson, that would be great.
but based on the above comments, we need to preserve the specified order.
like:
TEST=rangetypes, multirangetypes

will first run rangetypes then multirangetypes.

can we tag/name each src/test/regress/parallel_schedule groups
like:
group1:test: boolean char name varchar text int2 int4 int8 oid float4
float8 bit numeric txid uuid enum money rangetypes pg_lsn regproc
group2:test: strings md5 numerology point lseg line box path polygon
circle date time timetz timestamp timestamptz interval inet macaddr
macaddr8 multirangetypes

Then, we can test each individual group.
TEST=group1, group2.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-06-02 05:25:11 Re: meson and check-tests
Previous Message Jelte Fennema-Nio 2024-06-02 00:08:19 Extension security improvement: Add support for extensions with an owned schema