Skip to content
Snippets Groups Projects
Commit fc0c14d5 authored by Guido Gunther's avatar Guido Gunther :zzz:
Browse files

tests: Allow tests to depend on other source files from phosh as well

parent 21f2c079
No related branches found
No related tags found
1 merge request!109Initial app switcher
......@@ -21,25 +21,27 @@ test_link_args = [
'-fPIC',
]
test_stubs = [
# Deps for all tests
test_deps = [
'phoshstub.c',
wl_proto_sources,
]
cls_names = [
'favorites',
tests = [
['favorites', [ '@0@/src/app.c'.format(meson.source_root())]]
]
foreach cls_name : cls_names
t = executable('test-@0@'.format(cls_name),
['test-@0@.c'.format(cls_name),
'../src/@0@.c'.format(cls_name),
test_stubs],
foreach test : tests
t = executable('test-@0@'.format(test[0]),
['test-@0@.c'.format(test[0]),
'@0@/src/@1@.c'.format(meson.source_root(), test[0]),
test[1],
test_deps],
c_args: test_cflags,
link_args: test_link_args,
dependencies: phosh_deps,
)
test(cls_name, t, env: test_env)
test(test[0], t, env: test_env)
endforeach
endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment