mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
meson: Use files() for tests
Not having to provide the full path in the source tree is much nicer and the produced lists can also be used anywhere in the source tree.
This commit is contained in:
@@ -3588,7 +3588,8 @@ foreach tuple : tests
|
||||
parallel = tuple.length() > 7 ? tuple[7] : true
|
||||
timeout = 30
|
||||
|
||||
name = sources[0].split('/')[-1].split('.')[0]
|
||||
# FIXME: Use fs.stem() with meson >= 0.54.0
|
||||
name = '@0@'.format(sources[0]).split('/')[-1].split('.')[0]
|
||||
if type.startswith('timeout=')
|
||||
timeout = type.split('=')[1].to_int()
|
||||
type = ''
|
||||
|
||||
@@ -13,9 +13,9 @@ systemd_analyze_sources = files('''
|
||||
'''.split())
|
||||
|
||||
tests += [
|
||||
[['src/analyze/test-verify.c',
|
||||
'src/analyze/analyze-verify.c',
|
||||
'src/analyze/analyze-verify.h'],
|
||||
[files('test-verify.c',
|
||||
'analyze-verify.c',
|
||||
'analyze-verify.h'),
|
||||
[libcore,
|
||||
libshared],
|
||||
[],
|
||||
|
||||
@@ -352,7 +352,7 @@ endif
|
||||
if efi_arch[1] in ['ia32', 'x86_64', 'arm', 'aarch64']
|
||||
systemd_boot_sources += files('bcd.c')
|
||||
tests += [
|
||||
[['src/boot/efi/test-bcd.c'],
|
||||
[files('test-bcd.c'),
|
||||
[],
|
||||
[libzstd],
|
||||
[],
|
||||
|
||||
@@ -6,7 +6,7 @@ busctl_sources = files(
|
||||
'busctl.c')
|
||||
|
||||
tests += [
|
||||
[['src/busctl/test-busctl-introspect.c',
|
||||
'src/busctl/busctl-introspect.c',
|
||||
'src/busctl/busctl-introspect.h']],
|
||||
[files('test-busctl-introspect.c',
|
||||
'busctl-introspect.c',
|
||||
'busctl-introspect.h')],
|
||||
]
|
||||
|
||||
@@ -14,8 +14,8 @@ if conf.get('ENABLE_COREDUMP') == 1 and install_sysconfdir_samples
|
||||
endif
|
||||
|
||||
tests += [
|
||||
[['src/coredump/test-coredump-vacuum.c',
|
||||
'src/coredump/coredump-vacuum.c',
|
||||
'src/coredump/coredump-vacuum.h'],
|
||||
[files('test-coredump-vacuum.c',
|
||||
'coredump-vacuum.c',
|
||||
'coredump-vacuum.h'),
|
||||
[], [], [], '', 'manual'],
|
||||
]
|
||||
|
||||
@@ -61,9 +61,9 @@ if conf.get('ENABLE_IMPORTD') == 1
|
||||
endif
|
||||
|
||||
tests += [
|
||||
[['src/import/test-qcow2.c',
|
||||
'src/import/qcow2-util.c',
|
||||
'src/import/qcow2-util.h'],
|
||||
[files('test-qcow2.c',
|
||||
'qcow2-util.c',
|
||||
'qcow2-util.h'),
|
||||
[],
|
||||
[libz],
|
||||
[], 'HAVE_ZLIB', 'manual'],
|
||||
|
||||
@@ -81,7 +81,7 @@ endif
|
||||
############################################################
|
||||
|
||||
tests += [
|
||||
[['src/journal/test-journal-syslog.c'],
|
||||
[files('test-journal-syslog.c'),
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[threads,
|
||||
@@ -89,30 +89,30 @@ tests += [
|
||||
liblz4,
|
||||
libselinux]],
|
||||
|
||||
[['src/journal/test-journal-config.c'],
|
||||
[files('test-journal-config.c'),
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[libxz,
|
||||
liblz4,
|
||||
libselinux]],
|
||||
|
||||
[['src/journal/test-journal.c'],
|
||||
[files('test-journal.c'),
|
||||
[libjournal_core,
|
||||
libshared]],
|
||||
|
||||
[['src/journal/test-journal-stream.c'],
|
||||
[files('test-journal-stream.c'),
|
||||
[libjournal_core,
|
||||
libshared]],
|
||||
|
||||
[['src/journal/test-journal-flush.c'],
|
||||
[files('test-journal-flush.c'),
|
||||
[libjournal_core,
|
||||
libshared]],
|
||||
|
||||
[['src/journal/test-journal-verify.c'],
|
||||
[files('test-journal-verify.c'),
|
||||
[libjournal_core,
|
||||
libshared]],
|
||||
|
||||
[['src/journal/test-journal-interleaving.c'],
|
||||
[files('test-journal-interleaving.c'),
|
||||
[libjournal_core,
|
||||
libshared]],
|
||||
]
|
||||
|
||||
@@ -57,49 +57,49 @@ libsystemd_network_includes = [includes, include_directories('.')]
|
||||
############################################################
|
||||
|
||||
tests += [
|
||||
[['src/libsystemd-network/test-dhcp-option.c'],
|
||||
[files('test-dhcp-option.c'),
|
||||
[libshared,
|
||||
libsystemd_network]],
|
||||
|
||||
[['src/libsystemd-network/test-sd-dhcp-lease.c'],
|
||||
[files('test-sd-dhcp-lease.c'),
|
||||
[libshared,
|
||||
libsystemd_network]],
|
||||
|
||||
[['src/libsystemd-network/test-dhcp-client.c'],
|
||||
[files('test-dhcp-client.c'),
|
||||
[libshared,
|
||||
libsystemd_network]],
|
||||
|
||||
[['src/libsystemd-network/test-dhcp-server.c'],
|
||||
[files('test-dhcp-server.c'),
|
||||
[libshared,
|
||||
libsystemd_network]],
|
||||
|
||||
[['src/libsystemd-network/test-ipv4ll.c'],
|
||||
[files('test-ipv4ll.c'),
|
||||
[libshared,
|
||||
libsystemd_network]],
|
||||
|
||||
[['src/libsystemd-network/test-ipv4ll-manual.c'],
|
||||
[files('test-ipv4ll-manual.c'),
|
||||
[libshared,
|
||||
libsystemd_network],
|
||||
[], [], '', 'manual'],
|
||||
|
||||
[['src/libsystemd-network/test-acd.c'],
|
||||
[files('test-acd.c'),
|
||||
[libshared,
|
||||
libsystemd_network],
|
||||
[], [], '', 'manual'],
|
||||
|
||||
[['src/libsystemd-network/test-ndisc-rs.c'],
|
||||
[files('test-ndisc-rs.c'),
|
||||
[libshared,
|
||||
libsystemd_network]],
|
||||
|
||||
[['src/libsystemd-network/test-ndisc-ra.c'],
|
||||
[files('test-ndisc-ra.c'),
|
||||
[libshared,
|
||||
libsystemd_network]],
|
||||
|
||||
[['src/libsystemd-network/test-dhcp6-client.c'],
|
||||
[files('test-dhcp6-client.c'),
|
||||
[libshared,
|
||||
libsystemd_network]],
|
||||
|
||||
[['src/libsystemd-network/test-lldp-rx.c'],
|
||||
[files('test-lldp-rx.c'),
|
||||
[libshared,
|
||||
libsystemd_network]],
|
||||
]
|
||||
|
||||
@@ -190,43 +190,43 @@ custom_target(
|
||||
############################################################
|
||||
|
||||
tests += [
|
||||
[['src/libsystemd/sd-journal/test-journal-send.c']],
|
||||
[files('sd-journal/test-journal-send.c')],
|
||||
|
||||
[['src/libsystemd/sd-journal/test-journal-match.c']],
|
||||
[files('sd-journal/test-journal-match.c')],
|
||||
|
||||
[['src/libsystemd/sd-journal/test-journal-enum.c'],
|
||||
[files('sd-journal/test-journal-enum.c'),
|
||||
[], [], [], '', 'timeout=360'],
|
||||
|
||||
[['src/libsystemd/sd-journal/test-journal-init.c']],
|
||||
[files('sd-journal/test-journal-init.c')],
|
||||
|
||||
[['src/libsystemd/sd-journal/test-mmap-cache.c']],
|
||||
[files('sd-journal/test-mmap-cache.c')],
|
||||
|
||||
[['src/libsystemd/sd-journal/test-catalog.c']],
|
||||
[files('sd-journal/test-catalog.c')],
|
||||
|
||||
[['src/libsystemd/sd-journal/test-compress.c'],
|
||||
[files('sd-journal/test-compress.c'),
|
||||
[],
|
||||
[liblz4,
|
||||
libzstd,
|
||||
libxz]],
|
||||
|
||||
[['src/libsystemd/sd-journal/test-compress-benchmark.c'],
|
||||
[files('sd-journal/test-compress-benchmark.c'),
|
||||
[],
|
||||
[liblz4,
|
||||
libzstd,
|
||||
libxz],
|
||||
[], '', 'timeout=90'],
|
||||
|
||||
[['src/libsystemd/sd-journal/test-audit-type.c']],
|
||||
[files('sd-journal/test-audit-type.c')],
|
||||
]
|
||||
|
||||
############################################################
|
||||
|
||||
tests += [
|
||||
[['src/libsystemd/sd-bus/test-bus-address.c'],
|
||||
[files('sd-bus/test-bus-address.c'),
|
||||
[],
|
||||
[threads]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-marshal.c'],
|
||||
[files('sd-bus/test-bus-marshal.c'),
|
||||
[],
|
||||
[threads,
|
||||
libglib,
|
||||
@@ -234,82 +234,82 @@ tests += [
|
||||
libgio,
|
||||
libdbus]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-signature.c'],
|
||||
[files('sd-bus/test-bus-signature.c'),
|
||||
[],
|
||||
[threads]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-queue-ref-cycle.c'],
|
||||
[files('sd-bus/test-bus-queue-ref-cycle.c'),
|
||||
[],
|
||||
[threads]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-watch-bind.c'],
|
||||
[files('sd-bus/test-bus-watch-bind.c'),
|
||||
[],
|
||||
[threads],
|
||||
[], '', 'timeout=120'],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-chat.c'],
|
||||
[files('sd-bus/test-bus-chat.c'),
|
||||
[],
|
||||
[threads]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-cleanup.c'],
|
||||
[files('sd-bus/test-bus-cleanup.c'),
|
||||
[],
|
||||
[threads,
|
||||
libseccomp]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-track.c'],
|
||||
[files('sd-bus/test-bus-track.c'),
|
||||
[],
|
||||
[libseccomp]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-server.c'],
|
||||
[files('sd-bus/test-bus-server.c'),
|
||||
[],
|
||||
[threads]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-objects.c'],
|
||||
[files('sd-bus/test-bus-objects.c'),
|
||||
[],
|
||||
[threads]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-vtable.c',
|
||||
'src/libsystemd/sd-bus/test-vtable-data.h']],
|
||||
[files('sd-bus/test-bus-vtable.c',
|
||||
'sd-bus/test-vtable-data.h')],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-gvariant.c'],
|
||||
[files('sd-bus/test-bus-gvariant.c'),
|
||||
[],
|
||||
[libglib,
|
||||
libgobject,
|
||||
libgio]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-creds.c']],
|
||||
[files('sd-bus/test-bus-creds.c')],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-match.c']],
|
||||
[files('sd-bus/test-bus-match.c')],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-benchmark.c'],
|
||||
[files('sd-bus/test-bus-benchmark.c'),
|
||||
[],
|
||||
[threads],
|
||||
[], '', 'manual'],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-introspect.c',
|
||||
'src/libsystemd/sd-bus/test-vtable-data.h']],
|
||||
[files('sd-bus/test-bus-introspect.c',
|
||||
'sd-bus/test-vtable-data.h')],
|
||||
|
||||
[['src/libsystemd/sd-event/test-event.c']],
|
||||
[files('sd-event/test-event.c')],
|
||||
|
||||
[['src/libsystemd/sd-netlink/test-netlink.c']],
|
||||
[files('sd-netlink/test-netlink.c')],
|
||||
|
||||
[['src/libsystemd/sd-resolve/test-resolve.c'],
|
||||
[files('sd-resolve/test-resolve.c'),
|
||||
[],
|
||||
[threads],
|
||||
[], '', 'timeout=120'],
|
||||
|
||||
[['src/libsystemd/sd-login/test-login.c']],
|
||||
[files('sd-login/test-login.c')],
|
||||
|
||||
[['src/libsystemd/sd-device/test-sd-device.c']],
|
||||
[files('sd-device/test-sd-device.c')],
|
||||
|
||||
[['src/libsystemd/sd-device/test-device-util.c']],
|
||||
[files('sd-device/test-device-util.c')],
|
||||
|
||||
[['src/libsystemd/sd-device/test-sd-device-monitor.c']],
|
||||
[files('sd-device/test-sd-device-monitor.c')],
|
||||
]
|
||||
|
||||
if cxx_cmd != ''
|
||||
tests += [
|
||||
[['src/libsystemd/sd-bus/test-bus-vtable-cc.cc']],
|
||||
[files('sd-bus/test-bus-vtable-cc.cc')],
|
||||
]
|
||||
endif
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ custom_target(
|
||||
############################################################
|
||||
|
||||
tests += [
|
||||
[['src/libudev/test-libudev.c'],
|
||||
[files('test-libudev.c'),
|
||||
[libshared,
|
||||
libudev_basic]],
|
||||
]
|
||||
|
||||
@@ -30,7 +30,7 @@ if conf.get('ENABLE_LOCALED') == 1
|
||||
endif
|
||||
|
||||
tests += [
|
||||
[['src/locale/test-keymap-util.c',
|
||||
'src/locale/keymap-util.c',
|
||||
'src/locale/keymap-util.h']],
|
||||
[files('test-keymap-util.c',
|
||||
'keymap-util.c',
|
||||
'keymap-util.h')],
|
||||
]
|
||||
|
||||
@@ -101,12 +101,12 @@ endif
|
||||
############################################################
|
||||
|
||||
tests += [
|
||||
[['src/login/test-login-shared.c']],
|
||||
[files('test-login-shared.c')],
|
||||
|
||||
[['src/login/test-inhibit.c'],
|
||||
[files('test-inhibit.c'),
|
||||
[], [], [], '', 'manual'],
|
||||
|
||||
[['src/login/test-login-tables.c'],
|
||||
[files('test-login-tables.c'),
|
||||
[liblogind_core,
|
||||
libshared],
|
||||
[threads]],
|
||||
|
||||
@@ -37,7 +37,7 @@ if conf.get('ENABLE_MACHINED') == 1
|
||||
endif
|
||||
|
||||
tests += [
|
||||
[['src/machine/test-machine-tables.c'],
|
||||
[files('test-machine-tables.c'),
|
||||
[libmachine_core,
|
||||
libshared],
|
||||
[threads]],
|
||||
|
||||
@@ -279,37 +279,37 @@ fuzzers += [
|
||||
]
|
||||
|
||||
tests += [
|
||||
[['src/network/test-networkd-address.c'],
|
||||
[files('test-networkd-address.c'),
|
||||
[libnetworkd_core,
|
||||
libsystemd_network],
|
||||
[],
|
||||
network_includes],
|
||||
|
||||
[['src/network/test-networkd-conf.c'],
|
||||
[files('test-networkd-conf.c'),
|
||||
[libnetworkd_core,
|
||||
libsystemd_network],
|
||||
[],
|
||||
network_includes],
|
||||
|
||||
[['src/network/test-networkd-util.c'],
|
||||
[files('test-networkd-util.c'),
|
||||
[libnetworkd_core,
|
||||
libsystemd_network],
|
||||
[],
|
||||
network_includes],
|
||||
|
||||
[['src/network/test-network.c'],
|
||||
[files('test-network.c'),
|
||||
[libnetworkd_core,
|
||||
libsystemd_network],
|
||||
[threads],
|
||||
network_includes],
|
||||
|
||||
[['src/network/test-network-tables.c'],
|
||||
[files('test-network-tables.c'),
|
||||
[libnetworkd_core,
|
||||
libsystemd_network],
|
||||
[threads],
|
||||
network_includes],
|
||||
|
||||
[['src/network/generator/test-network-generator.c',
|
||||
'src/network/generator/network-generator.c',
|
||||
'src/network/generator/network-generator.h']],
|
||||
[files('generator/test-network-generator.c',
|
||||
'generator/network-generator.c',
|
||||
'generator/network-generator.h')],
|
||||
]
|
||||
|
||||
@@ -53,12 +53,12 @@ systemd_nspawn_sources = files('nspawn.c')
|
||||
############################################################
|
||||
|
||||
tests += [
|
||||
[['src/nspawn/test-nspawn-tables.c'],
|
||||
[files('test-nspawn-tables.c'),
|
||||
[libnspawn_core,
|
||||
libshared],
|
||||
[libseccomp]],
|
||||
|
||||
[['src/nspawn/test-patch-uid.c'],
|
||||
[files('test-patch-uid.c'),
|
||||
[libnspawn_core,
|
||||
libshared],
|
||||
[libacl],
|
||||
|
||||
@@ -28,7 +28,7 @@ if conf.get('ENABLE_OOMD') == 1
|
||||
endif
|
||||
|
||||
tests += [
|
||||
[['src/oom/test-oomd-util.c',
|
||||
'src/oom/oomd-util.c',
|
||||
'src/oom/oomd-util.h']],
|
||||
[files('test-oomd-util.c',
|
||||
'oomd-util.c',
|
||||
'oomd-util.h')],
|
||||
]
|
||||
|
||||
@@ -174,40 +174,40 @@ custom_target(
|
||||
############################################################
|
||||
|
||||
tests += [
|
||||
[['src/resolve/test-resolve-tables.c'],
|
||||
[files('test-resolve-tables.c'),
|
||||
[libsystemd_resolve_core,
|
||||
libshared],
|
||||
[lib_openssl_or_gcrypt,
|
||||
libm]],
|
||||
|
||||
[['src/resolve/test-dns-packet.c'],
|
||||
[files('test-dns-packet.c'),
|
||||
[libsystemd_resolve_core,
|
||||
libshared],
|
||||
[lib_openssl_or_gcrypt,
|
||||
libm]],
|
||||
|
||||
[['src/resolve/test-resolved-etc-hosts.c',
|
||||
'src/resolve/resolved-etc-hosts.c',
|
||||
'src/resolve/resolved-etc-hosts.h'],
|
||||
[files('test-resolved-etc-hosts.c',
|
||||
'resolved-etc-hosts.c',
|
||||
'resolved-etc-hosts.h'),
|
||||
[libsystemd_resolve_core,
|
||||
libshared],
|
||||
[lib_openssl_or_gcrypt,
|
||||
libm]],
|
||||
|
||||
[['src/resolve/test-resolved-packet.c'],
|
||||
[files('test-resolved-packet.c'),
|
||||
[libsystemd_resolve_core,
|
||||
libshared],
|
||||
[lib_openssl_or_gcrypt,
|
||||
libm]],
|
||||
|
||||
[['src/resolve/test-dnssec.c'],
|
||||
[files('test-dnssec.c'),
|
||||
[libsystemd_resolve_core,
|
||||
libshared],
|
||||
[lib_openssl_or_gcrypt,
|
||||
libm],
|
||||
[], 'HAVE_OPENSSL_OR_GCRYPT'],
|
||||
|
||||
[['src/resolve/test-dnssec-complex.c'],
|
||||
[files('test-dnssec-complex.c'),
|
||||
[libsystemd_resolve_core,
|
||||
libshared],
|
||||
[lib_openssl_or_gcrypt,
|
||||
|
||||
@@ -7,9 +7,9 @@ systemd_shutdown_sources = files('''
|
||||
'''.split())
|
||||
|
||||
tests += [
|
||||
[['src/shutdown/test-umount.c',
|
||||
'src/shutdown/umount.c',
|
||||
'src/shutdown/umount.h'],
|
||||
[files('test-umount.c',
|
||||
'umount.c',
|
||||
'umount.h'),
|
||||
[],
|
||||
[libmount]],
|
||||
]
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -55,7 +55,7 @@ endif
|
||||
############################################################
|
||||
|
||||
tests += [
|
||||
[['src/timesync/test-timesync.c'],
|
||||
[files('test-timesync.c'),
|
||||
[libtimesyncd_core,
|
||||
libshared],
|
||||
[libm]],
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user