Re: meson missing test dependencies
Nazir Bilal Yavuz <byavuz81@gmail.com>
From: Nazir Bilal Yavuz <byavuz81@gmail.com>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-12-02T10:50:57Z
Lists: pgsql-hackers
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
Commits
-
oauth: Correct test dependency on oauth_hook_client
- 444826b6dc17 18.2 landed
- c6a10a89feab 19 (unreleased) landed
-
meson: Add missing dependencies for libpq tests
- ad80e5823a50 16.7 landed
- 73ed502ea677 17.3 landed
- 26aca4de43d5 18.0 landed
-
meson: Add missing dependencies to libpq_pipeline test
- 5acf0636f874 16.7 landed
- 09df23cf321e 17.3 landed
- c89525d57bce 18.0 landed
-
meson: Add pg_regress_ecpg to ecpg test dependencies
- 057762066792 16.7 landed
- f52bc2388277 17.3 landed
- 69b05d581eca 18.0 landed
-
meson: Add test dependencies for test_json_parser
- 493398de2c4e 17.3 landed
- 1be5c3737243 18.0 landed
-
meson: Improve dependencies for tmp_install test target
- dab83a62fc62 16.7 landed
- 74ef4855b081 18.0 landed
- 25cb77694128 17.3 landed
-
meson: Narrow dependencies for 'install-quiet' target
- 80620931053d 16.7 landed
- c2ede6640ca2 18.0 landed
- 6a4815c49226 17.3 landed