diff options
author | Kenny Levinsen <kl@kl.wtf> | 2021-03-15 20:22:55 +0100 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2021-03-15 20:22:55 +0100 |
commit | 951c1790fadf57e39c47f3d47451f86cca2d0889 (patch) | |
tree | 6c6a01406e0a1a311f6027594d8c601fd2d3ea0d | |
parent | d8ddf590faf49dec01453adc6ea238d94ba84478 (diff) |
meson: Clean up test declarations a bit
-rw-r--r-- | meson.build | 37 |
1 files changed, 12 insertions, 25 deletions
diff --git a/meson.build b/meson.build index 5b06e57..83c942b 100644 --- a/meson.build +++ b/meson.build @@ -186,31 +186,18 @@ if get_option('examples').enabled() ) endif -test( - 'linked_list', - executable( - 'linked_list_test', - ['common/linked_list.c', 'tests/linked_list.c'], - include_directories: [include_directories('.', 'include')], - ) -) -test( - 'poller', - executable( - 'poller_test', - ['common/linked_list.c', 'seatd/poller.c', 'tests/poller.c'], - include_directories: [include_directories('.', 'include')], - ) -) - -test( - 'connection', - executable( - 'connection_test', - ['common/connection.c', 'tests/connection.c'], - include_directories: [include_directories('.', 'include')], - ) -) +tests = { + 'linked_list': ['common/linked_list.c'], + 'connection': ['common/connection.c'], + 'poller': ['common/linked_list.c', 'seatd/poller.c'], +} + +foreach name, value : tests + test(name, executable( + '@0@_test'.format(name), + ['tests/@0@.c'.format(name), value], + include_directories: [include_directories('.', 'include')])) +endforeach if get_option('server').enabled() scdoc = dependency('scdoc', required: get_option('man-pages'), version: '>= 1.9.7', native: true) |