Re: meson and check-tests

Поиск
Список
Период
Сортировка
От Nazir Bilal Yavuz
Тема Re: meson and check-tests
Дата
Msg-id CAN55FZ3t+eDgKtsDoyi0UYwzbMkKDfqJgvsbamar9CvY_6qWPw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: meson and check-tests  (jian he <jian.universality@gmail.com>)
Список pgsql-hackers
Hi,

On Sun, 2 Jun 2024 at 07:06, jian he <jian.universality@gmail.com> wrote:
>
> 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?

Yes, it is required to run at least two setup tests because regress
tests require a database to be created:

1- The initdb executable is needed, and it is installed by the
'tmp_install' test for the tests.

2- Although the initdb executable exists, it is not enough by itself.
Regress tests copies its database contents from the template
directory, instead of running initdb for each test [1] (This is the
default behaviour in the meson builds' regress tests). This template
directory is created by the 'initdb_cache' test.

[1] 252dcb3239

--
Regards,
Nazir Bilal Yavuz
Microsoft



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Smith
Дата:
Сообщение: walsender.c comment with no context is hard to understand
Следующее
От: Aleksander Alekseev
Дата:
Сообщение: Re: meson "experimental"?