X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=tests%2Fmeson.build;fp=tests%2Fmeson.build;h=90ff73d80e7ccc84a5b6146093161438e79704a0;hb=fae4b6a8915d29a4f0e7fa8434c1283dc4920d6f;hp=0000000000000000000000000000000000000000;hpb=4ddd55c75597b62b952090022c9cbaa61bc1ce43;p=src%2Fagl-compositor.git diff --git a/tests/meson.build b/tests/meson.build new file mode 100644 index 0000000..90ff73d --- /dev/null +++ b/tests/meson.build @@ -0,0 +1,35 @@ +dep_test_client = dependency('libweston-test-10') +dep_test_client_runner = dependency('libweston-test-runner-10') + +# FIXME: extra depends should be actually be added here +tests = [ + { 'name': 'agl-client-shell' }, +] + +foreach t : tests + t_name = 'test-' + t.get('name') + t_sources = t.get('sources', [t.get('name') + '-test.c']) + t_sources += [ agl_shell_client_protocol_h, agl_shell_protocol_c, + xdg_shell_client_protocol_h, xdg_shell_protocol_c, + agl_screenshooter_client_protocol_h, + agl_screenshooter_protocol_c ] + + t_deps = [ dep_test_client, dep_test_client_runner, + libweston_dep, dep_libexec_compositor ] + t_deps += t.get('dep_objs', []) + + t_exe = executable( + t_name, + t_sources, + c_args: [ + '-DUNIT_TEST', + '-DTHIS_TEST_NAME="' + t_name + '"', + ], + build_by_default: true, + include_directories: common_inc, + dependencies: t_deps, + install: false, + ) + + test(t.get('name'), t_exe, depends: t.get('test_deps', [])) +endforeach