diff options
author | Jan Janssen <medhefgo@web.de> | 2023-01-25 17:19:52 +0100 |
---|---|---|
committer | Jan Janssen <medhefgo@web.de> | 2023-02-21 15:10:26 +0100 |
commit | 822cd3ff2579d6de8acd45d85d2b9d5f44048d5c (patch) | |
tree | 570148c87a6ea6f4cfcbe2b4db525684f3af9534 /src/network | |
parent | meson: Add simple_tests list (diff) | |
download | systemd-822cd3ff2579d6de8acd45d85d2b9d5f44048d5c.tar.xz systemd-822cd3ff2579d6de8acd45d85d2b9d5f44048d5c.zip |
meson: Use dicts for test definitions
Although this slightly more verbose it makes it much easier to reason
about. The code that produces the tests heavily benefits from this.
Test lists are also now sorted by test name.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/meson.build | 67 |
1 files changed, 35 insertions, 32 deletions
diff --git a/src/network/meson.build b/src/network/meson.build index f48c4ed182..0b68b74b45 100644 --- a/src/network/meson.build +++ b/src/network/meson.build @@ -187,37 +187,40 @@ fuzzers += [ network_includes], ] -tests += [ - [files('test-networkd-address.c'), - [libnetworkd_core, - libsystemd_network], - [libatomic], - network_includes], - - [files('test-networkd-conf.c'), - [libnetworkd_core, - libsystemd_network], - [libatomic], - network_includes], - - [files('test-networkd-util.c'), - [libnetworkd_core, - libsystemd_network], - [], - network_includes], +test_network_base = { + 'link_with' : [libnetworkd_core, libsystemd_network], + 'includes' : network_includes, +} - [files('test-network.c'), - [libnetworkd_core, - libsystemd_network], - [threads], - network_includes], - - [files('test-network-tables.c'), - [libnetworkd_core, - libsystemd_network], - [threads], - network_includes], - - [files('generator/test-network-generator.c', - 'generator/network-generator.c')], +tests += [ + { + 'sources' : files( + 'generator/network-generator.c', + 'generator/test-network-generator.c' + ) + }, + { + 'sources' : files('test-network-tables.c'), + 'dependencies' : threads, + 'base' : test_network_base, + }, + { + 'sources' : files('test-network.c'), + 'dependencies' : threads, + 'base' : test_network_base, + }, + { + 'sources' : files('test-networkd-address.c'), + 'dependencies' : libatomic, + 'base' : test_network_base, + }, + { + 'sources' : files('test-networkd-conf.c'), + 'dependencies' : libatomic, + 'base' : test_network_base, + }, + { + 'sources' : files('test-networkd-util.c'), + 'base' : test_network_base, + }, ] |