Skip to content

Commit

Permalink
Make test executables dependencies of tests
Browse files Browse the repository at this point in the history
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 mesonbuild/meson#2518 which has
been open for only 6+ years now [face-palm.gif]

Signed-off-by: Simo Sorce <[email protected]>
  • Loading branch information
simo5 committed Apr 24, 2024
1 parent cce30ed commit 6db890e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,13 @@ test_programs = [
'pincache',
]

test_executables = []
foreach t : test_programs
executable(t, '@[email protected]'.format(t),
include_directories: [configinc],
dependencies: [libcrypto, libssl])
t = executable(t, '@[email protected]'.format(t),
build_by_default: false,
include_directories: [configinc],
dependencies: [libcrypto, libssl])
test_executables += [t]
endforeach

tests = {
Expand Down Expand Up @@ -144,6 +147,7 @@ foreach t, extra_args : tests
args: '@0@-@[email protected]'.format(t, suite),
suite: suite,
env: test_env,
depends: test_executables,
is_parallel: is_parallel,
)
endforeach
Expand Down

0 comments on commit 6db890e

Please sign in to comment.