Hi,
On Mon, 2 Dec 2024 at 13:11, Peter Eisentraut <peter@eisentraut.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