meson missing test dependencies

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-12-02T10:10:56Z
Lists: pgsql-hackers

Attachments

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?

Commits

  1. oauth: Correct test dependency on oauth_hook_client

  2. meson: Add missing dependencies for libpq tests

  3. meson: Add missing dependencies to libpq_pipeline test

  4. meson: Add pg_regress_ecpg to ecpg test dependencies

  5. meson: Add test dependencies for test_json_parser

  6. meson: Improve dependencies for tmp_install test target

  7. meson: Narrow dependencies for 'install-quiet' target