tests: Add support for specifying runtime dependencies

Signed-off-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
Matt Turner 2024-12-19 21:48:49 -05:00 committed by Simon Ser
parent ca83185e8a
commit 6c1da92018

View file

@ -195,12 +195,14 @@ tests = {
foreach test_name, test_extras : tests
test_extra_sources = test_extras.get('extra_sources', [])
test_runtime_deps = test_extras.get('runtime_deps', [])
test_sources = [ test_name + '.c' ] + test_extra_sources
test_deps = [test_runner_dep, epoll_dep]
bin = executable(test_name, test_sources, dependencies: test_deps)
test(
test_name,
bin,
depends: test_runtime_deps,
env: [
'TEST_SRC_DIR=@0@'.format(meson.current_source_dir()),
'TEST_BUILD_DIR=@0@'.format(meson.current_build_dir()),