diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-01-04 20:00:10 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-01-19 07:04:19 +0900 |
commit | b09f01463a9ce08320769aef798cd4b60a6c6456 (patch) | |
tree | 42a97d68388cc9ebecc91bf86532dfe837f95e2e | |
parent | a28c0617de34de3b1c5a69de5b00e276d2bcef93 (diff) | |
download | systemd-b09f01463a9ce08320769aef798cd4b60a6c6456.tar.gz |
meson: enable several tests even if the relevant features are disabled
-rw-r--r-- | src/coredump/meson.build | 2 | ||||
-rw-r--r-- | src/machine/meson.build | 3 | ||||
-rw-r--r-- | src/network/meson.build | 136 | ||||
-rw-r--r-- | src/oom/meson.build | 12 | ||||
-rw-r--r-- | src/resolve/meson.build | 20 | ||||
-rw-r--r-- | src/timesync/meson.build | 3 |
6 files changed, 80 insertions, 96 deletions
diff --git a/src/coredump/meson.build b/src/coredump/meson.build index c63760d4a9..5607a78cf5 100644 --- a/src/coredump/meson.build +++ b/src/coredump/meson.build @@ -23,5 +23,5 @@ tests += [ [['src/coredump/test-coredump-vacuum.c', 'src/coredump/coredump-vacuum.c', 'src/coredump/coredump-vacuum.h'], - [], [], [], 'ENABLE_COREDUMP', 'manual'], + [], [], [], '', 'manual'], ] diff --git a/src/machine/meson.build b/src/machine/meson.build index ac13690397..9b9ad1d8a9 100644 --- a/src/machine/meson.build +++ b/src/machine/meson.build @@ -39,6 +39,5 @@ tests += [ [['src/machine/test-machine-tables.c'], [libmachine_core, libshared], - [threads], - [], 'ENABLE_MACHINED'], + [threads]], ] diff --git a/src/network/meson.build b/src/network/meson.build index 063ed0d901..606c93ca45 100644 --- a/src/network/meson.build +++ b/src/network/meson.build @@ -181,44 +181,41 @@ network_generator_sources = files(''' generator/network-generator.h '''.split()) -network_include_dir = [includes, include_directories(['.', 'netdev', 'tc'])] +sources += custom_target( + 'networkd-gperf.c', + input : 'networkd-gperf.gperf', + output : 'networkd-gperf.c', + command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@']) -if conf.get('ENABLE_NETWORKD') == 1 - if get_option('link-networkd-shared') - networkd_link_with = [libshared] - else - networkd_link_with = [libsystemd_static, - libshared_static, - libbasic_gcrypt] - endif +sources += custom_target( + 'networkd-network-gperf.c', + input : 'networkd-network-gperf.gperf', + output : 'networkd-network-gperf.c', + command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@']) - networkd_gperf_c = custom_target( - 'networkd-gperf.c', - input : 'networkd-gperf.gperf', - output : 'networkd-gperf.c', - command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@']) +sources += custom_target( + 'netdev-gperf.c', + input : 'netdev/netdev-gperf.gperf', + output : 'netdev-gperf.c', + command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@']) - networkd_network_gperf_c = custom_target( - 'networkd-network-gperf.c', - input : 'networkd-network-gperf.gperf', - output : 'networkd-network-gperf.c', - command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@']) +if get_option('link-networkd-shared') + networkd_link_with = [libshared] +else + networkd_link_with = [libsystemd_static, + libshared_static, + libbasic_gcrypt] +endif - netdev_gperf_c = custom_target( - 'netdev-gperf.c', - input : 'netdev/netdev-gperf.gperf', - output : 'netdev-gperf.c', - command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@']) +network_include_dir = [includes, include_directories(['.', 'netdev', 'tc'])] - libnetworkd_core = static_library( - 'networkd-core', - sources, - networkd_gperf_c, - networkd_network_gperf_c, - netdev_gperf_c, - include_directories : network_include_dir, - link_with : [networkd_link_with]) +libnetworkd_core = static_library( + 'networkd-core', + sources, + include_directories : network_include_dir, + link_with : [networkd_link_with]) +if conf.get('ENABLE_NETWORKD') == 1 install_data('org.freedesktop.network1.conf', install_dir : dbuspolicydir) install_data('org.freedesktop.network1.service', @@ -238,49 +235,44 @@ if conf.get('ENABLE_NETWORKD') == 1 install_data('networkd.conf', install_dir : pkgsysconfdir) endif +endif - fuzzers += [ - [['src/network/fuzz-netdev-parser.c', - 'src/fuzz/fuzz.h'], - [libnetworkd_core, - libsystemd_network, - networkd_link_with], - [threads], - network_include_dir], +fuzzers += [ + [['src/network/fuzz-netdev-parser.c'], + [libnetworkd_core, + libsystemd_network, + networkd_link_with], + [threads], + network_include_dir], - [['src/network/fuzz-network-parser.c', - 'src/fuzz/fuzz.h'], - [libnetworkd_core, - libsystemd_network, - networkd_link_with], - [threads], - network_include_dir], - ] + [['src/network/fuzz-network-parser.c'], + [libnetworkd_core, + libsystemd_network, + networkd_link_with], + [threads], + network_include_dir], +] - tests += [ - [['src/network/test-networkd-conf.c'], - [libnetworkd_core, - libsystemd_network], - [], - network_include_dir], +tests += [ + [['src/network/test-networkd-conf.c'], + [libnetworkd_core, + libsystemd_network], + [], + network_include_dir], - [['src/network/test-network.c'], - [libnetworkd_core, - libsystemd_network, - networkd_link_with], - [threads], - network_include_dir], + [['src/network/test-network.c'], + [libnetworkd_core, + libsystemd_network], + [threads], + network_include_dir], - [['src/network/test-network-tables.c', - test_tables_h], - [libnetworkd_core, - libsystemd_network, - networkd_link_with], - [threads], - network_include_dir], + [['src/network/test-network-tables.c'], + [libnetworkd_core, + libsystemd_network], + [threads], + network_include_dir], - [['src/network/generator/test-network-generator.c', - 'src/network/generator/network-generator.c', - 'src/network/generator/network-generator.h']], - ] -endif + [['src/network/generator/test-network-generator.c', + 'src/network/generator/network-generator.c', + 'src/network/generator/network-generator.h']], +] diff --git a/src/oom/meson.build b/src/oom/meson.build index 1cb66bc477..4e1c8543c8 100644 --- a/src/oom/meson.build +++ b/src/oom/meson.build @@ -15,12 +15,6 @@ oomctl_sources = files(''' '''.split()) if conf.get('ENABLE_OOMD') == 1 - tests += [ - [['src/oom/test-oomd-util.c', - 'src/oom/oomd-util.c', - 'src/oom/oomd-util.h']], - ] - install_data('org.freedesktop.oom1.conf', install_dir : dbuspolicydir) @@ -32,3 +26,9 @@ if conf.get('ENABLE_OOMD') == 1 install_dir : pkgsysconfdir) endif endif + +tests += [ + [['src/oom/test-oomd-util.c', + 'src/oom/oomd-util.c', + 'src/oom/oomd-util.h']], +] diff --git a/src/resolve/meson.build b/src/resolve/meson.build index 5c23fe43ce..2ed67a86ad 100644 --- a/src/resolve/meson.build +++ b/src/resolve/meson.build @@ -167,22 +167,19 @@ if conf.get('ENABLE_RESOLVE') == 1 endif tests += [ - [['src/resolve/test-resolve-tables.c', - 'src/shared/test-tables.h'], + [['src/resolve/test-resolve-tables.c'], [libsystemd_resolve_core, libshared], [libgcrypt, libgpg_error, - libm], - [], 'ENABLE_RESOLVE'], + libm]], [['src/resolve/test-dns-packet.c'], [libsystemd_resolve_core, libshared], [libgcrypt, libgpg_error, - libm], - [], 'ENABLE_RESOLVE'], + libm]], [['src/resolve/test-resolved-etc-hosts.c', 'src/resolve/resolved-etc-hosts.c', @@ -191,26 +188,23 @@ tests += [ libshared], [libgcrypt, libgpg_error, - libm], - [], 'ENABLE_RESOLVE'], + libm]], [['src/resolve/test-resolved-packet.c'], [libsystemd_resolve_core, libshared], [libgcrypt, libgpg_error, - libm], - [], 'ENABLE_RESOLVE'], + libm]], [['src/resolve/test-dnssec.c'], [libsystemd_resolve_core, libshared], [libgcrypt, libgpg_error, - libm], - [], 'ENABLE_RESOLVE'], + libm]], [['src/resolve/test-dnssec-complex.c', 'src/resolve/dns-type.c'], - [], [], [], 'ENABLE_RESOLVE', 'manual'], + [], [], [], '', 'manual'], ] diff --git a/src/timesync/meson.build b/src/timesync/meson.build index 6b486cd1c4..9096ef1076 100644 --- a/src/timesync/meson.build +++ b/src/timesync/meson.build @@ -50,6 +50,5 @@ tests += [ 'src/timesync/timesyncd-server.h', timesyncd_gperf_c], [], - [libm], - [], 'ENABLE_TIMESYNCD'], + [libm]], ] |