Re: meson missing test dependencies

From: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: meson missing test dependencies
Date: 2024-12-02 10:50:57
Message-ID: CAN55FZ0SHO82HnafXG6PHPECuCdwSoAadGDrom_ooAB3vOfssw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Mon, 2 Dec 2024 at 13:11, Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>
> I have noticed that under meson many tests don't have dependencies on
> the build artifacts that they are testing. As an example among many, if
> you make a source code change in contrib/cube/cube.c (see patch 0001 for
> a demo) and then run
>
> make -C contrib/cube check
>
> the test run will reflect the changed code, because the "check" targets
> typically depend on the "all" targets. But if you do this under meson with
>
> meson test -C build --suite setup --suite cube
>
> the code will not be rebuilt first, and the test run will not reflect
> the changed code.
>
> This seems straightforward to fix, see patch 0002. The meson test setup
> has support for this, but it seems not widely used.
>
> Patch 0003 is another example, this time for a TAP-style test.
>
> Is there any reason this was not done yet?

This looks useful. I am not sure why this was not done before.

I applied your patches and the cube example worked. But when I edited
'test_json_parser_perf.c' and 'test_json_parser_incremental.c', meson
did not rebuild. I used the 'meson test -C build --suite setup --suite
test_json_parser' command to test test_json_parser. Did I do something
wrong?

--
Regards,
Nazir Bilal Yavuz
Microsoft

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2024-12-02 10:57:05 fixing tsearch locale support
Previous Message Heikki Linnakangas 2024-12-02 10:42:20 Re: Interrupts vs signals