From 6db890e56cc8f90740785cc905973f40c8762eb6 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 23 Apr 2024 13:01:35 -0400 Subject: [PATCH] Make test executables dependencies of tests This way they get built before the tests are run if not already We mark these binary as not build by default, but that does nothing because https://github.com/mesonbuild/meson/issues/2518 which has been open for only 6+ years now [face-palm.gif] Signed-off-by: Simo Sorce --- tests/meson.build | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/meson.build b/tests/meson.build index fd402b53..65c93578 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -104,10 +104,13 @@ test_programs = [ 'pincache', ] +test_executables = [] foreach t : test_programs - executable(t, '@0@.c'.format(t), - include_directories: [configinc], - dependencies: [libcrypto, libssl]) + t = executable(t, '@0@.c'.format(t), + build_by_default: false, + include_directories: [configinc], + dependencies: [libcrypto, libssl]) + test_executables += [t] endforeach tests = { @@ -144,6 +147,7 @@ foreach t, extra_args : tests args: '@0@-@1@.t'.format(t, suite), suite: suite, env: test_env, + depends: test_executables, is_parallel: is_parallel, ) endforeach