WIP: Boostrapped agl-client-shell tests.
[src/agl-compositor.git] / tests / meson.build
1 dep_test_client = dependency('libweston-test-10')
2 dep_test_client_runner = dependency('libweston-test-runner-10')
3
4 # FIXME: extra depends should be actually be added here
5 tests = [
6     { 'name': 'agl-client-shell' },
7 ]
8
9 foreach t : tests
10         t_name = 'test-' + t.get('name')
11         t_sources = t.get('sources', [t.get('name') + '-test.c'])
12         t_sources += [ agl_shell_client_protocol_h, agl_shell_protocol_c,
13                        xdg_shell_client_protocol_h, xdg_shell_protocol_c,
14                        agl_screenshooter_client_protocol_h,
15                        agl_screenshooter_protocol_c ]
16
17         t_deps = [ dep_test_client, dep_test_client_runner,
18                     libweston_dep, dep_libexec_compositor ]
19         t_deps += t.get('dep_objs', [])
20
21         t_exe = executable(
22                 t_name,
23                 t_sources,
24                 c_args: [
25                         '-DUNIT_TEST',
26                         '-DTHIS_TEST_NAME="' + t_name + '"',
27                 ],
28                 build_by_default: true,
29                 include_directories: common_inc,
30                 dependencies: t_deps,
31                 install: false,
32         )
33
34         test(t.get('name'), t_exe, depends: t.get('test_deps', []))
35 endforeach