Re: meson and check-tests - Mailing list pgsql-hackers

From jian he
Subject Re: meson and check-tests
Date
Msg-id CACJufxGSb7SYc3w4jLaLpB=Sx1feSWOnbqX2tv5X0nv8WZMcjg@mail.gmail.com
Whole thread Raw
In response to Re: meson and check-tests  ("Tristan Partin" <tristan@partin.io>)
Responses Re: meson and check-tests
List pgsql-hackers
On Sun, Jun 2, 2024 at 4:48 AM Tristan Partin <tristan@partin.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.



pgsql-hackers by date:

Previous
From: Jelte Fennema-Nio
Date:
Subject: Extension security improvement: Add support for extensions with an owned schema
Next
From: Tom Lane
Date:
Subject: Re: meson and check-tests