aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2024-12-19 21:44:00 -0500
committerSimon Ser <contact@emersion.fr>2025-06-08 20:56:31 +0200
commit1d6fba989d24ef458a38390d5d6f9543aa57ef0e (patch)
tree4a49c742bf6b6e014aeaef8e729a06f6de156416
parentcursor: Properly check realloc for errors (diff)
downloadwayland-1d6fba989d24ef458a38390d5d6f9543aa57ef0e.tar
wayland-1d6fba989d24ef458a38390d5d6f9543aa57ef0e.tar.gz
wayland-1d6fba989d24ef458a38390d5d6f9543aa57ef0e.tar.bz2
wayland-1d6fba989d24ef458a38390d5d6f9543aa57ef0e.tar.lz
wayland-1d6fba989d24ef458a38390d5d6f9543aa57ef0e.tar.xz
wayland-1d6fba989d24ef458a38390d5d6f9543aa57ef0e.tar.zst
wayland-1d6fba989d24ef458a38390d5d6f9543aa57ef0e.zip
tests: Make `tests` dict elements dicts themselves
Previously each value was a list of extra sources. The next commit will add an additional field to each test, so they need to be dicts themselves. Signed-off-by: Matt Turner <mattst88@gmail.com> (cherry picked from commit ca83185e8a28017ff3a2f9edccaa5d35bb86f1d7)
-rw-r--r--tests/meson.build161
1 files changed, 97 insertions, 64 deletions
diff --git a/tests/meson.build b/tests/meson.build
index 2c22b82..cf3c4e8 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -96,72 +96,105 @@ if get_option('scanner')
endif
tests = {
- 'array-test': [],
- 'client-test': [ wayland_server_protocol_h ],
- 'display-test': [
- wayland_client_protocol_h,
- wayland_server_protocol_h,
- tests_server_protocol_h,
- tests_client_protocol_c,
- tests_protocol_c,
- ],
- 'connection-test': [
- wayland_client_protocol_h,
- wayland_server_protocol_h,
- ],
- 'event-loop-test': [ wayland_server_protocol_h ],
- 'fixed-test': [],
- 'interface-test': [ wayland_client_protocol_h ],
- 'list-test': [],
- 'map-test': [],
- 'sanity-test' : [
- wayland_client_protocol_h,
- wayland_server_protocol_h,
- ],
- 'socket-test': [
- wayland_client_protocol_h,
- wayland_server_protocol_h,
- ],
- 'queue-test': [
- wayland_client_protocol_h,
- wayland_server_protocol_h,
- ],
- 'signal-test': [ wayland_server_protocol_h ],
- 'newsignal-test': [
- # wayland-server.c is needed here to access wl_priv_* functions
- files('../src/wayland-server.c'),
- wayland_server_protocol_h,
- ],
- 'resources-test': [ wayland_server_protocol_h ],
- 'message-test': [
- wayland_client_protocol_h,
- wayland_server_protocol_h,
- ],
- 'compositor-introspection-test': [
- wayland_client_protocol_h,
- wayland_server_protocol_h,
- ],
- 'protocol-logger-test': [
- wayland_client_protocol_h,
- wayland_server_protocol_h,
- ],
- 'headers-test': [
- wayland_client_protocol_h,
- wayland_server_protocol_h,
- 'headers-protocol-test.c',
- wayland_client_protocol_core_h,
- wayland_server_protocol_core_h,
- 'headers-protocol-core-test.c',
- ],
- 'os-wrappers-test': [],
- 'proxy-test': [
- wayland_client_protocol_h,
- wayland_server_protocol_h,
- ],
- 'enum-validator-test': [],
+ 'array-test': {},
+ 'client-test': {
+ 'extra_sources': [ wayland_server_protocol_h ],
+ },
+ 'display-test': {
+ 'extra_sources': [
+ wayland_client_protocol_h,
+ wayland_server_protocol_h,
+ tests_server_protocol_h,
+ tests_client_protocol_c,
+ tests_protocol_c,
+ ],
+ },
+ 'connection-test': {
+ 'extra_sources': [
+ wayland_client_protocol_h,
+ wayland_server_protocol_h,
+ ],
+ },
+ 'event-loop-test': {
+ 'extra_sources': [ wayland_server_protocol_h ],
+ },
+ 'fixed-test': {},
+ 'interface-test': {
+ 'extra_sources': [ wayland_client_protocol_h ],
+ },
+ 'list-test': {},
+ 'map-test': {},
+ 'sanity-test' : {
+ 'extra_sources': [
+ wayland_client_protocol_h,
+ wayland_server_protocol_h,
+ ],
+ },
+ 'socket-test': {
+ 'extra_sources': [
+ wayland_client_protocol_h,
+ wayland_server_protocol_h,
+ ],
+ },
+ 'queue-test': {
+ 'extra_sources': [
+ wayland_client_protocol_h,
+ wayland_server_protocol_h,
+ ],
+ },
+ 'signal-test': {
+ 'extra_sources': [ wayland_server_protocol_h ],
+ },
+ 'newsignal-test': {
+ 'extra_sources': [
+ # wayland-server.c is needed here to access wl_priv_* functions
+ files('../src/wayland-server.c'),
+ wayland_server_protocol_h,
+ ],
+ },
+ 'resources-test': {
+ 'extra_sources': [ wayland_server_protocol_h ],
+ },
+ 'message-test': {
+ 'extra_sources': [
+ wayland_client_protocol_h,
+ wayland_server_protocol_h,
+ ],
+ },
+ 'compositor-introspection-test': {
+ 'extra_sources': [
+ wayland_client_protocol_h,
+ wayland_server_protocol_h,
+ ],
+ },
+ 'protocol-logger-test': {
+ 'extra_sources': [
+ wayland_client_protocol_h,
+ wayland_server_protocol_h,
+ ],
+ },
+ 'headers-test': {
+ 'extra_sources': [
+ wayland_client_protocol_h,
+ wayland_server_protocol_h,
+ 'headers-protocol-test.c',
+ wayland_client_protocol_core_h,
+ wayland_server_protocol_core_h,
+ 'headers-protocol-core-test.c',
+ ],
+ },
+ 'os-wrappers-test': {},
+ 'proxy-test': {
+ 'extra_sources': [
+ wayland_client_protocol_h,
+ wayland_server_protocol_h,
+ ],
+ },
+ 'enum-validator-test': {},
}
-foreach test_name, test_extra_sources: tests
+foreach test_name, test_extras : tests
+ test_extra_sources = test_extras.get('extra_sources', [])
test_sources = [ test_name + '.c' ] + test_extra_sources
test_deps = [test_runner_dep, epoll_dep]
bin = executable(test_name, test_sources, dependencies: test_deps)