Build or rebuild binary target when tests are run #11550
-
For script-based tests I need meson to build or rebuild the binary. The binary target is created in the top-level meson.build. The script-based tests are in tests/meson.build. Is there a way to build the binary target when |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
This is a case where the answer is in the docs. I add a test setup for the main binary target and set parallelism to
https://mesonbuild.com/Unit-tests.html#test-parameters https://mesonbuild.com/Unit-tests.html#parallelism And the fix magically appears at: |
Beta Was this translation helpful? Give feedback.
-
Pretty sure what you want here is
By adding a test that executes main_bin without args and expects it to return success, all you do is make the entire test suite depend on that bin before running any tests, but
|
Beta Was this translation helpful? Give feedback.
Pretty sure what you want here is
depends: main_bin
, see https://mesonbuild.com/Reference-manual_functions.html#testBy adding a test that executes main_bin without args and expects it to return success, all you do is make the entire test suite depend on that bin before running any tests, but
depends:
does the same job except better -- it also works when you run