tests/wayland: Declare test clients using a list

It'll be easier to add new tests this way.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1557>
This commit is contained in:
Jonas Ådahl 2020-11-10 22:08:36 +01:00 committed by Marge Bot
parent c55a3d1edc
commit 4d15438d66

View File

@ -45,32 +45,24 @@ common_sources = [
test_driver_protocol_code,
]
executable('subsurface-remap-toplevel',
sources: [
'subsurface-remap-toplevel.c',
common_sources,
],
include_directories: tests_includepath,
c_args: tests_c_args,
dependencies: [
glib_dep,
wayland_client_dep,
],
install: have_installed_tests,
install_dir: wayland_test_client_installed_tests_libexecdir,
)
wayland_test_clients = [
'subsurface-remap-toplevel',
'invalid-subsurfaces',
]
executable('invalid-subsurfaces',
sources: [
'invalid-subsurfaces.c',
common_sources,
],
include_directories: tests_includepath,
c_args: tests_c_args,
dependencies: [
glib_dep,
wayland_client_dep,
],
install: have_installed_tests,
install_dir: wayland_test_client_installed_tests_libexecdir,
)
foreach test : wayland_test_clients
executable(test,
sources: [
'@0@.c'.format(test),
common_sources,
],
include_directories: tests_includepath,
c_args: tests_c_args,
dependencies: [
glib_dep,
wayland_client_dep,
],
install: have_installed_tests,
install_dir: wayland_test_client_installed_tests_libexecdir,
)
endforeach