You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
weston/tests/meson.build

452 lines
10 KiB

plugin_test_shell_desktop = shared_library(
'weston-test-desktop-shell',
'weston-test-desktop-shell.c',
include_directories: common_inc,
dependencies: [ dep_lib_desktop, dep_libweston_public ],
name_prefix: '',
install: false
)
env_modmap += 'weston-test-desktop-shell.so=@0@;'.format(plugin_test_shell_desktop.full_path())
lib_test_runner = static_library(
'test-runner',
'weston-test-runner.c',
tests: thread-based client harness This replaces the old test harness with a new one. The old harness relied on fork()'ing each test which makes tests independent, but makes debugging them harder. The new harness runs client code in a thread instead of a new process. A side-effect of not fork()'ing anymore is that any failure will stop running a test series short. Fortunately we do not have any tests that are expected to crash or fail. The old harness executed 'weston' from Meson, with lots of setup as both command line options and environment variables. The new harness executes wet_main() instead: the test program itself calls the compositor main function to execute the compositor in-process. Command line arguments are configured in the test program itself, not in meson.build. Environment variables aside, you are able to run a test by simply executing the test program, even if it is a plugin test. The new harness adds a new type of iteration: fixtures. For now, fixtures are used to set up the compositor for tests that need a compositor. If necessary, a fixture setup may include a data array of arbitrary type for executing the test series for each element in the array. This will be most useful for running screenshooting tests with both Pixman- and GL-renderers. The new harness outputs TAP formatted results into stdout. Meson is not switched to consume TAP yet though, because it would require a Meson version requirement bump and would not have any benefits at this time. OTOH outputting TAP is trivial and sets up a clear precedent of random test chatter belonging to stderr. This commit migrates only few tests to actually make use of the new features: roles is a basic client test, subsurface-shot is a client test that demonstrates the fixture array, and plugin-registry is a plugin test. The rest of the tests will be migrated later. Once all tests are migrated, we can remove the test-specific setup from meson.build, leaving only the actual build instructions in there. The not migrated tests and stand-alone tests suffer only a minor change: they no longer fork() for each TEST(), otherwise they keep running as before. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
5 years ago
dependencies: [
dep_libweston_private_h_deps,
dep_wayland_client,
],
include_directories: common_inc,
install: false,
)
dep_test_runner = declare_dependency(
dependencies: dep_wayland_client,
link_with: lib_test_runner
)
lib_test_client = static_library(
'test-client',
tests: thread-based client harness This replaces the old test harness with a new one. The old harness relied on fork()'ing each test which makes tests independent, but makes debugging them harder. The new harness runs client code in a thread instead of a new process. A side-effect of not fork()'ing anymore is that any failure will stop running a test series short. Fortunately we do not have any tests that are expected to crash or fail. The old harness executed 'weston' from Meson, with lots of setup as both command line options and environment variables. The new harness executes wet_main() instead: the test program itself calls the compositor main function to execute the compositor in-process. Command line arguments are configured in the test program itself, not in meson.build. Environment variables aside, you are able to run a test by simply executing the test program, even if it is a plugin test. The new harness adds a new type of iteration: fixtures. For now, fixtures are used to set up the compositor for tests that need a compositor. If necessary, a fixture setup may include a data array of arbitrary type for executing the test series for each element in the array. This will be most useful for running screenshooting tests with both Pixman- and GL-renderers. The new harness outputs TAP formatted results into stdout. Meson is not switched to consume TAP yet though, because it would require a Meson version requirement bump and would not have any benefits at this time. OTOH outputting TAP is trivial and sets up a clear precedent of random test chatter belonging to stderr. This commit migrates only few tests to actually make use of the new features: roles is a basic client test, subsurface-shot is a client test that demonstrates the fixture array, and plugin-registry is a plugin test. The rest of the tests will be migrated later. Once all tests are migrated, we can remove the test-specific setup from meson.build, leaving only the actual build instructions in there. The not migrated tests and stand-alone tests suffer only a minor change: they no longer fork() for each TEST(), otherwise they keep running as before. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
5 years ago
[
'weston-test-client-helper.c',
'weston-test-fixture-compositor.c',
weston_test_client_protocol_h,
weston_test_protocol_c,
],
include_directories: common_inc,
dependencies: [
dep_libshared,
dep_wayland_client,
tests: thread-based client harness This replaces the old test harness with a new one. The old harness relied on fork()'ing each test which makes tests independent, but makes debugging them harder. The new harness runs client code in a thread instead of a new process. A side-effect of not fork()'ing anymore is that any failure will stop running a test series short. Fortunately we do not have any tests that are expected to crash or fail. The old harness executed 'weston' from Meson, with lots of setup as both command line options and environment variables. The new harness executes wet_main() instead: the test program itself calls the compositor main function to execute the compositor in-process. Command line arguments are configured in the test program itself, not in meson.build. Environment variables aside, you are able to run a test by simply executing the test program, even if it is a plugin test. The new harness adds a new type of iteration: fixtures. For now, fixtures are used to set up the compositor for tests that need a compositor. If necessary, a fixture setup may include a data array of arbitrary type for executing the test series for each element in the array. This will be most useful for running screenshooting tests with both Pixman- and GL-renderers. The new harness outputs TAP formatted results into stdout. Meson is not switched to consume TAP yet though, because it would require a Meson version requirement bump and would not have any benefits at this time. OTOH outputting TAP is trivial and sets up a clear precedent of random test chatter belonging to stderr. This commit migrates only few tests to actually make use of the new features: roles is a basic client test, subsurface-shot is a client test that demonstrates the fixture array, and plugin-registry is a plugin test. The rest of the tests will be migrated later. Once all tests are migrated, we can remove the test-specific setup from meson.build, leaving only the actual build instructions in there. The not migrated tests and stand-alone tests suffer only a minor change: they no longer fork() for each TEST(), otherwise they keep running as before. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
5 years ago
dep_libexec_weston,
dep_pixman,
dependency('cairo'),
],
install: false,
)
dep_test_client = declare_dependency(
link_with: lib_test_client,
dependencies: [
dep_wayland_client,
dep_test_runner,
dep_pixman,
]
)
exe_plugin_test = shared_library(
'test-plugin',
'weston-test.c',
weston_test_server_protocol_h,
weston_test_protocol_c,
include_directories: common_inc,
tests: thread-based client harness This replaces the old test harness with a new one. The old harness relied on fork()'ing each test which makes tests independent, but makes debugging them harder. The new harness runs client code in a thread instead of a new process. A side-effect of not fork()'ing anymore is that any failure will stop running a test series short. Fortunately we do not have any tests that are expected to crash or fail. The old harness executed 'weston' from Meson, with lots of setup as both command line options and environment variables. The new harness executes wet_main() instead: the test program itself calls the compositor main function to execute the compositor in-process. Command line arguments are configured in the test program itself, not in meson.build. Environment variables aside, you are able to run a test by simply executing the test program, even if it is a plugin test. The new harness adds a new type of iteration: fixtures. For now, fixtures are used to set up the compositor for tests that need a compositor. If necessary, a fixture setup may include a data array of arbitrary type for executing the test series for each element in the array. This will be most useful for running screenshooting tests with both Pixman- and GL-renderers. The new harness outputs TAP formatted results into stdout. Meson is not switched to consume TAP yet though, because it would require a Meson version requirement bump and would not have any benefits at this time. OTOH outputting TAP is trivial and sets up a clear precedent of random test chatter belonging to stderr. This commit migrates only few tests to actually make use of the new features: roles is a basic client test, subsurface-shot is a client test that demonstrates the fixture array, and plugin-registry is a plugin test. The rest of the tests will be migrated later. Once all tests are migrated, we can remove the test-specific setup from meson.build, leaving only the actual build instructions in there. The not migrated tests and stand-alone tests suffer only a minor change: they no longer fork() for each TEST(), otherwise they keep running as before. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
5 years ago
dependencies: [
dep_libexec_weston,
dep_libweston_private,
dep_threads
],
name_prefix: '',
install: false,
)
deps_zuc = [ dep_libshared ]
if get_option('test-junit-xml')
d = dependency('libxml-2.0', version: '>= 2.6', required: false)
if not d.found()
error('JUnit XML support requires libxml-2.0 >= 2.6 which was not found. Or, you can use \'-Dtest-junit-xml=false\'.')
endif
deps_zuc += d
config_h.set('ENABLE_JUNIT_XML', '1')
endif
lib_zuc = static_library(
'zunitc',
'../tools/zunitc/inc/zunitc/zunitc.h',
'../tools/zunitc/inc/zunitc/zunitc_impl.h',
'../tools/zunitc/src/zuc_base_logger.c',
'../tools/zunitc/src/zuc_base_logger.h',
'../tools/zunitc/src/zuc_collector.c',
'../tools/zunitc/src/zuc_collector.h',
'../tools/zunitc/src/zuc_context.h',
'../tools/zunitc/src/zuc_event.h',
'../tools/zunitc/src/zuc_event_listener.h',
'../tools/zunitc/src/zuc_junit_reporter.c',
'../tools/zunitc/src/zuc_junit_reporter.h',
'../tools/zunitc/src/zuc_types.h',
'../tools/zunitc/src/zunitc_impl.c',
include_directories: [ common_inc, include_directories('../tools/zunitc/inc') ],
dependencies: deps_zuc,
)
dep_zuc = declare_dependency(
link_with: lib_zuc,
dependencies: dep_libshared,
include_directories: include_directories('../tools/zunitc/inc')
)
lib_zucmain = static_library(
'zunitcmain',
'../tools/zunitc/src/main.c',
include_directories: [ common_inc, include_directories('../tools/zunitc/inc') ],
dependencies: [ dep_libshared, dep_zuc ],
)
dep_zucmain = declare_dependency(
link_with: lib_zucmain,
dependencies: dep_zuc
)
tests: thread-based client harness This replaces the old test harness with a new one. The old harness relied on fork()'ing each test which makes tests independent, but makes debugging them harder. The new harness runs client code in a thread instead of a new process. A side-effect of not fork()'ing anymore is that any failure will stop running a test series short. Fortunately we do not have any tests that are expected to crash or fail. The old harness executed 'weston' from Meson, with lots of setup as both command line options and environment variables. The new harness executes wet_main() instead: the test program itself calls the compositor main function to execute the compositor in-process. Command line arguments are configured in the test program itself, not in meson.build. Environment variables aside, you are able to run a test by simply executing the test program, even if it is a plugin test. The new harness adds a new type of iteration: fixtures. For now, fixtures are used to set up the compositor for tests that need a compositor. If necessary, a fixture setup may include a data array of arbitrary type for executing the test series for each element in the array. This will be most useful for running screenshooting tests with both Pixman- and GL-renderers. The new harness outputs TAP formatted results into stdout. Meson is not switched to consume TAP yet though, because it would require a Meson version requirement bump and would not have any benefits at this time. OTOH outputting TAP is trivial and sets up a clear precedent of random test chatter belonging to stderr. This commit migrates only few tests to actually make use of the new features: roles is a basic client test, subsurface-shot is a client test that demonstrates the fixture array, and plugin-registry is a plugin test. The rest of the tests will be migrated later. Once all tests are migrated, we can remove the test-specific setup from meson.build, leaving only the actual build instructions in there. The not migrated tests and stand-alone tests suffer only a minor change: they no longer fork() for each TEST(), otherwise they keep running as before. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
5 years ago
tests = [
{ 'name': 'plugin-registry', },
{ 'name': 'roles', },
{ 'name': 'string', },
tests: thread-based client harness This replaces the old test harness with a new one. The old harness relied on fork()'ing each test which makes tests independent, but makes debugging them harder. The new harness runs client code in a thread instead of a new process. A side-effect of not fork()'ing anymore is that any failure will stop running a test series short. Fortunately we do not have any tests that are expected to crash or fail. The old harness executed 'weston' from Meson, with lots of setup as both command line options and environment variables. The new harness executes wet_main() instead: the test program itself calls the compositor main function to execute the compositor in-process. Command line arguments are configured in the test program itself, not in meson.build. Environment variables aside, you are able to run a test by simply executing the test program, even if it is a plugin test. The new harness adds a new type of iteration: fixtures. For now, fixtures are used to set up the compositor for tests that need a compositor. If necessary, a fixture setup may include a data array of arbitrary type for executing the test series for each element in the array. This will be most useful for running screenshooting tests with both Pixman- and GL-renderers. The new harness outputs TAP formatted results into stdout. Meson is not switched to consume TAP yet though, because it would require a Meson version requirement bump and would not have any benefits at this time. OTOH outputting TAP is trivial and sets up a clear precedent of random test chatter belonging to stderr. This commit migrates only few tests to actually make use of the new features: roles is a basic client test, subsurface-shot is a client test that demonstrates the fixture array, and plugin-registry is a plugin test. The rest of the tests will be migrated later. Once all tests are migrated, we can remove the test-specific setup from meson.build, leaving only the actual build instructions in there. The not migrated tests and stand-alone tests suffer only a minor change: they no longer fork() for each TEST(), otherwise they keep running as before. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
5 years ago
{ 'name': 'subsurface-shot', },
{
'name': 'vertex-clip',
'dep_objs': dep_vertex_clipping,
},
tests: thread-based client harness This replaces the old test harness with a new one. The old harness relied on fork()'ing each test which makes tests independent, but makes debugging them harder. The new harness runs client code in a thread instead of a new process. A side-effect of not fork()'ing anymore is that any failure will stop running a test series short. Fortunately we do not have any tests that are expected to crash or fail. The old harness executed 'weston' from Meson, with lots of setup as both command line options and environment variables. The new harness executes wet_main() instead: the test program itself calls the compositor main function to execute the compositor in-process. Command line arguments are configured in the test program itself, not in meson.build. Environment variables aside, you are able to run a test by simply executing the test program, even if it is a plugin test. The new harness adds a new type of iteration: fixtures. For now, fixtures are used to set up the compositor for tests that need a compositor. If necessary, a fixture setup may include a data array of arbitrary type for executing the test series for each element in the array. This will be most useful for running screenshooting tests with both Pixman- and GL-renderers. The new harness outputs TAP formatted results into stdout. Meson is not switched to consume TAP yet though, because it would require a Meson version requirement bump and would not have any benefits at this time. OTOH outputting TAP is trivial and sets up a clear precedent of random test chatter belonging to stderr. This commit migrates only few tests to actually make use of the new features: roles is a basic client test, subsurface-shot is a client test that demonstrates the fixture array, and plugin-registry is a plugin test. The rest of the tests will be migrated later. Once all tests are migrated, we can remove the test-specific setup from meson.build, leaving only the actual build instructions in there. The not migrated tests and stand-alone tests suffer only a minor change: they no longer fork() for each TEST(), otherwise they keep running as before. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
5 years ago
]
tests_standalone = [
['config-parser', [], [ dep_zucmain ]],
['matrix', [], [ dep_libm, dep_matrix_c ]],
['timespec', [], [ dep_zucmain ]],
['zuc',
[
'../tools/zunitc/test/fixtures_test.c',
'../tools/zunitc/test/zunitc_test.c'
],
[ dep_zucmain ]
],
]
tests_weston = [
['bad-buffer'],
['devices'],
['event'],
[
'keyboard',
[
'input-timestamps-helper.c',
input_timestamps_unstable_v1_client_protocol_h,
input_timestamps_unstable_v1_protocol_c,
]
],
libweston: Introduce zwp_linux_explicit_synchronization_v1 Introduce support for the zwp_linux_explicit_synchronization_unstable_v1 protocol with an implementation of the zwp_linux_explicit_synchronization_v1 interface. Explicit synchronization provides a more versatile notification mechanism for buffer readiness and availability, and can be used to improve efficiency by integrating with related functionality in display and graphics APIs. In addition, the per-commit nature of the release events provided by this protocol potentially offers a solution to a deficiency of the wl_buffer.release event (see https://gitlab.freedesktop.org/wayland/wayland/issues/46). Support for this protocol depends on the capabilities of the backend, so we don't register it by default but provide a function which each backend will need to call. In this commit only the headless backend when using the noop renderer supports this to enable testing. Note that the zwp_surface_synchronization_v1 interface, which contains the core functionality of the protocol, is not implemented in this commit. Support for it will be added in future commits. Changes in v7: - Added some information in the commit message about the benefits of the explicit sync protocol. Changes in v6: - Fall back to advertising minor version 1 of the explicit sync protocol, although we support minor version 2 features, until the new wayland-protocols version is released. Changes in v5: - Meson support. - Advertise minor version 2 of the explicit sync protocol. Changes in v4: - Enable explicit sync support in the headless backend for all renderers. Changes in v3: - Use wl_resource_get_version() instead of hardcoding version 1. - Use updated protocol interface names. - Use correct format specifier for resource id. - Change test name to 'linux-explicit-synchronization.weston' (s/_/-/g). Changes in v2: - Move implementation to separate file so protocol can be registered on demand by backends. - Register protocol in headless+noop backend for testing purposes. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
6 years ago
[
'linux-explicit-synchronization',
[
linux_explicit_synchronization_unstable_v1_client_protocol_h,
linux_explicit_synchronization_unstable_v1_protocol_c,
]
],
['internal-screenshot'],
[
'presentation',
[
presentation_time_client_protocol_h,
presentation_time_protocol_c,
]
],
[
'pointer',
[
'input-timestamps-helper.c',
input_timestamps_unstable_v1_client_protocol_h,
input_timestamps_unstable_v1_protocol_c,
]
],
['subsurface'],
[
'text',
[
text_input_unstable_v1_client_protocol_h,
text_input_unstable_v1_protocol_c,
]
],
[
'touch',
[
'input-timestamps-helper.c',
input_timestamps_unstable_v1_client_protocol_h,
input_timestamps_unstable_v1_protocol_c,
]
],
[
'viewporter',
[
viewporter_client_protocol_h,
viewporter_protocol_c,
]
],
]
if get_option('xwayland')
d = dependency('x11', required: false)
if not d.found()
error('Xwayland tests require libX11 which was not found. Or, you can use \'-Dxwayland=false\'.')
endif
tests_weston += [ [ 'xwayland', [], d ] ]
endif
tests_weston_plugin = [
['surface'],
['surface-global'],
['surface-screenshot', 'surface-screenshot-test.c', dep_libshared],
]
if get_option('shell-ivi')
tests_weston += [
[
'ivi-shell-app',
[
ivi_application_client_protocol_h,
ivi_application_protocol_c,
]
]
]
tests_weston_plugin += [
['ivi-layout-internal'],
]
ivi_layout_test_plugin = shared_library(
'test-ivi-layout',
[
'ivi-layout-test-plugin.c',
weston_test_server_protocol_h,
weston_test_protocol_c,
],
include_directories: common_inc,
dependencies: [ dep_libweston_private, dep_libexec_weston ],
name_prefix: '',
install: false,
)
env_modmap += 'test-ivi-layout.so=' + ivi_layout_test_plugin.full_path() + ';'
tests += [
{
'name': 'ivi-layout-client',
'sources': [
'ivi-layout-test-client.c',
ivi_application_client_protocol_h,
ivi_application_protocol_c,
],
'test_deps': [ ivi_layout_test_plugin ],
},
]
endif
env_test_weston = [
'WESTON_TEST_REFERENCE_PATH=@0@/reference'.format(meson.current_source_dir()),
'WESTON_MODULE_MAP=@0@'.format(env_modmap),
'WESTON_DATA_DIR=' + join_paths(meson.current_source_dir(), '..', 'data'),
]
test_config_h = configuration_data()
test_config_h.set_quoted('WESTON_TEST_REFERENCE_PATH', meson.current_source_dir() + '/reference')
test_config_h.set_quoted('WESTON_MODULE_MAP', env_modmap)
test_config_h.set_quoted('WESTON_DATA_DIR', join_paths(meson.current_source_dir(), '..', 'data'))
test_config_h.set_quoted('TESTSUITE_PLUGIN_PATH', exe_plugin_test.full_path())
configure_file(output: 'test-config.h', configuration: test_config_h)
tests: thread-based client harness This replaces the old test harness with a new one. The old harness relied on fork()'ing each test which makes tests independent, but makes debugging them harder. The new harness runs client code in a thread instead of a new process. A side-effect of not fork()'ing anymore is that any failure will stop running a test series short. Fortunately we do not have any tests that are expected to crash or fail. The old harness executed 'weston' from Meson, with lots of setup as both command line options and environment variables. The new harness executes wet_main() instead: the test program itself calls the compositor main function to execute the compositor in-process. Command line arguments are configured in the test program itself, not in meson.build. Environment variables aside, you are able to run a test by simply executing the test program, even if it is a plugin test. The new harness adds a new type of iteration: fixtures. For now, fixtures are used to set up the compositor for tests that need a compositor. If necessary, a fixture setup may include a data array of arbitrary type for executing the test series for each element in the array. This will be most useful for running screenshooting tests with both Pixman- and GL-renderers. The new harness outputs TAP formatted results into stdout. Meson is not switched to consume TAP yet though, because it would require a Meson version requirement bump and would not have any benefits at this time. OTOH outputting TAP is trivial and sets up a clear precedent of random test chatter belonging to stderr. This commit migrates only few tests to actually make use of the new features: roles is a basic client test, subsurface-shot is a client test that demonstrates the fixture array, and plugin-registry is a plugin test. The rest of the tests will be migrated later. Once all tests are migrated, we can remove the test-specific setup from meson.build, leaving only the actual build instructions in there. The not migrated tests and stand-alone tests suffer only a minor change: they no longer fork() for each TEST(), otherwise they keep running as before. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
5 years ago
foreach t : tests
t_name = 'test-' + t.get('name')
t_sources = t.get('sources', [t.get('name') + '-test.c'])
t_sources += weston_test_client_protocol_h
t_deps = [ dep_test_client, dep_libweston_private_h ]
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', []))
tests: thread-based client harness This replaces the old test harness with a new one. The old harness relied on fork()'ing each test which makes tests independent, but makes debugging them harder. The new harness runs client code in a thread instead of a new process. A side-effect of not fork()'ing anymore is that any failure will stop running a test series short. Fortunately we do not have any tests that are expected to crash or fail. The old harness executed 'weston' from Meson, with lots of setup as both command line options and environment variables. The new harness executes wet_main() instead: the test program itself calls the compositor main function to execute the compositor in-process. Command line arguments are configured in the test program itself, not in meson.build. Environment variables aside, you are able to run a test by simply executing the test program, even if it is a plugin test. The new harness adds a new type of iteration: fixtures. For now, fixtures are used to set up the compositor for tests that need a compositor. If necessary, a fixture setup may include a data array of arbitrary type for executing the test series for each element in the array. This will be most useful for running screenshooting tests with both Pixman- and GL-renderers. The new harness outputs TAP formatted results into stdout. Meson is not switched to consume TAP yet though, because it would require a Meson version requirement bump and would not have any benefits at this time. OTOH outputting TAP is trivial and sets up a clear precedent of random test chatter belonging to stderr. This commit migrates only few tests to actually make use of the new features: roles is a basic client test, subsurface-shot is a client test that demonstrates the fixture array, and plugin-registry is a plugin test. The rest of the tests will be migrated later. Once all tests are migrated, we can remove the test-specific setup from meson.build, leaving only the actual build instructions in there. The not migrated tests and stand-alone tests suffer only a minor change: they no longer fork() for each TEST(), otherwise they keep running as before. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
5 years ago
endforeach
# FIXME: the multiple loops is lame. rethink this.
foreach t : tests_standalone
if t[0] != 'zuc'
srcs_t = [
'@0@-test.c'.format(t.get(0)),
weston_test_client_protocol_h,
]
else
srcs_t = []
endif
if t.length() > 1
srcs_t += t.get(1)
endif
if t.length() > 2
deps_t = t[2]
else
deps_t = [ dep_test_client ]
endif
exe_t = executable(
'test-@0@'.format(t.get(0)),
srcs_t,
c_args: [ '-DUNIT_TEST' ],
build_by_default: true,
include_directories: common_inc,
dependencies: deps_t,
install: false,
)
# matrix-test is a manual test
if t[0] != 'matrix'
test(t.get(0), exe_t)
endif
endforeach
foreach t : tests_weston
srcs_t = [
'@0@-test.c'.format(t.get(0)),
weston_test_client_protocol_h,
]
if t.length() > 1
srcs_t += t.get(1)
endif
deps_t = [
dep_test_client
]
if t.length() > 2
deps_t += t.get(2)
endif
args_t = [
'--backend=headless-backend.so',
'--socket=test-@0@'.format(t.get(0)),
'--modules=@0@'.format(exe_plugin_test.full_path()),
'--width=320',
'--height=240',
]
if t.get(0) == 'xwayland'
args_t += '--xwayland'
endif
# FIXME: Get this from the array ... ?
if t.get(0) == 'internal-screenshot'
args_t += [ '--config=@0@/internal-screenshot.ini'.format(meson.current_source_dir()) ]
args_t += [ '--use-pixman' ]
args_t += [ '--shell=desktop-shell.so' ]
elif t[0] == 'subsurface-shot'
args_t += [ '--no-config' ]
args_t += [ '--use-pixman' ]
args_t += [ '--width=320' ]
args_t += [ '--height=240' ]
args_t += [ '--shell=weston-test-desktop-shell.so' ]
elif t.get(0) == 'linux-explicit-synchronization'
args_t += [ '--use-pixman' ]
elif t.get(0).startswith('ivi-')
args_t += [ '--config=@0@/../ivi-shell/weston-ivi-test.ini'.format(meson.current_build_dir()) ]
args_t += [ '--shell=ivi-shell.so' ]
else
args_t += [ '--no-config' ]
args_t += [ '--shell=desktop-shell.so' ]
endif
exe_t = executable(
'test-@0@'.format(t.get(0)),
srcs_t,
c_args: [ '-DUNIT_TEST' ],
include_directories: common_inc,
dependencies: deps_t,
install: false,
)
env_t = [
'WESTON_TEST_CLIENT_PATH=@0@'.format(exe_t.full_path())
]
env_t += env_test_weston
test(t.get(0), exe_weston, env: env_t, args: args_t)
endforeach
foreach t : tests_weston_plugin
srcs_t = []
if t.length() > 1
srcs_t += t.get(1)
else
srcs_t += '@0@-test.c'.format(t.get(0))
endif
deps_t = [
dep_libweston_private,
]
if t.length() > 2
deps_t += t.get(2)
endif
exe_t = shared_library(
'test-@0@'.format(t.get(0)),
srcs_t,
include_directories: common_inc,
dependencies: deps_t,
name_prefix: '',
install: false,
)
args_t = [
'--backend=headless-backend.so',
'--socket=test-@0@'.format(t.get(0)),
]
# FIXME: Get this from the array ... ?
if t.get(0).startswith('ivi-')
args_t += [ '--no-config' ]
args_t += [ '--modules=@1@,@0@'.format(exe_plugin_test.full_path(),exe_t.full_path()) ]
args_t += [ '--shell=ivi-shell.so' ]
else
args_t += [ '--no-config' ]
args_t += [ '--shell=desktop-shell.so' ]
args_t += [ '--modules=@0@'.format(exe_t.full_path()) ]
endif
# surface-screenshot is a manual test
if t[0] != 'surface-screenshot'
test(t.get(0), exe_weston, env: env_test_weston, args: args_t)
endif
endforeach
if get_option('backend-drm')
executable(
'setbacklight',
'setbacklight.c',
dependencies: [
dep_backlight,
dep_libdrm,
dependency('libudev')
],
include_directories: common_inc,
install: false
)
endif