1 dep_pixman = dependency('pixman-1', version: '>= 0.25.2')
3 lib_test_runner = static_library(
5 'weston-test-runner.c',
10 include_directories: common_inc,
14 dep_test_runner = declare_dependency(
15 dependencies: dep_wayland_client,
16 link_with: lib_test_runner
19 lib_test_client = static_library(
22 'weston-test-client-helper.c',
23 'weston-test-fixture-compositor.c',
24 '../shared/os-compatibility.c',
26 weston_test_client_protocol_h,
27 weston_test_protocol_c,
28 viewporter_client_protocol_h,
29 viewporter_protocol_c,
30 agl_shell_client_protocol_h,
32 xdg_shell_client_protocol_h,
35 include_directories: common_inc,
39 dep_libexec_compositor,
45 dep_test_client = declare_dependency(
46 link_with: lib_test_client,
48 viewporter_client_protocol_h,
54 dependency('libudev', version: '>= 136'),
59 { 'name': 'agl-client-shell' },
63 test_config_h = configuration_data()
64 test_config_h.set_quoted('WESTON_TEST_REFERENCE_PATH', meson.current_source_dir() + '/reference')
65 test_config_h.set_quoted('WESTON_MODULE_MAP', env_modmap)
66 test_config_h.set_quoted('WESTON_DATA_DIR', join_paths(meson.current_source_dir(), '..', 'data'))
67 message('Test suite plug-in path is ' + libweston_dep.get_pkgconfig_variable('libdir'))
68 test_config_h.set_quoted('TESTSUITE_PLUGIN_PATH', libweston_dep.get_pkgconfig_variable('libdir') + '/' + 'test-plugin.so')
69 configure_file(output: 'test-config.h', configuration: test_config_h)
72 t_name = 'test-' + t.get('name')
73 t_sources = t.get('sources', [t.get('name') + '-test.c'])
74 t_sources += weston_test_client_protocol_h
76 t_deps = [ dep_test_client, libweston_dep ]
77 t_deps += t.get('dep_objs', [])
84 '-DTHIS_TEST_NAME="' + t_name + '"',
86 build_by_default: true,
87 include_directories: common_inc,
92 test(t.get('name'), t_exe, depends: t.get('test_deps', []))