Re: Minor meson gripe

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Minor meson gripe
Дата
Msg-id 20230209205605.zo5gfhli22g2kdm2@awork3.anarazel.de
обсуждение исходный текст
Ответ на Minor meson gripe  (Peter Geoghegan <pg@bowt.ie>)
Ответы Re: Minor meson gripe  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-hackers
Hi,

On 2023-02-09 11:01:31 -0800, Peter Geoghegan wrote:
> Currently, meson has a test suite named "setup". According to the
> Wiki, this is needed to get something equivalent to "make check", by
> running "meson test -v --suite setup --suite regress".

Yep.


> Some questions about this:
>
> * Isn't it confusing that we have a suite by that name, given that we
> also need to use the unrelated --setup flag for some nearby testing
> recipes?

Hm. I don't find it particularly confusing, but I don't think I'm a good judge
of that, too close.


> * Why do we actually need a "setup" suite?
>
> Offhand it appears that a simple "meson test -v --suite regress" works
> just as well. Have I missed something?

It'll work, but only if you have run setup before. And it'll not use changed C
code.

The setup suite creates the installation in tmp_install/. So if you haven't
run the tests before, it'll fail due to that missing. If you have run it
before, but have changed code, it'll not get used.


The background for the issue is that while meson test supports dependencies
for each test, and will build exactly the required dependencies if you run
individual tests with meson test, it unfortunately also adds all the test
dependencies to the default ninja target.

That's mostly for historical reasons, because initially meson didn't support
dependencies for tests. There's recent work on changing that though.

Creating the temp installation every time you run 'ninja' would not be
nice. On slower machines it can take quite a while.


I think medium term we should just stop requiring a temporary install to run
tests, it's substantial, unnecessary, overhead, and it requires us to build
way too much to run basic tests. It'd not take a whole lot to make that work:

- a search path for finding extensions, which'd be very useful for other
  reasons as well

- a way to tell 'postgres', 'initdb' etc, which use find_other_exec(), that
  they should use PATH
  
- a way to tell initdb where to find things like postgres.bki, postgres where
  it can find timezone data, etc.


Greetings,

Andres Freund



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: MacOS: xsltproc fails with "warning: failed to load external entity"
Следующее
От: Nathan Bossart
Дата:
Сообщение: pg_usleep for multisecond delays