mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
meson: define tests
Tests can be run with 'ninja-build test' or using 'mesontest'. '-Dtests=unsafe' can be used to include the "unsafe" tests in the test suite, same as with autotools. v2: - use more conf.get guards are optional components - declare deps on generated headers for test-{af,arphrd,cap}-list v3: - define environment for tests Most test don't need this, but to be consistent with autotools-based build, and to avoid questions which tests need it and which don't, set the same environment for all tests. v4: - rework test generation Use a list of lists to define each test. This way we can reduce the boilerplate somewhat, although the test listings are still pretty verbose. We can also move the definitions of the tests to the subdirs. Unfortunately some subdirs are included earlier than some of the libraries that test binaries are linked to. So just dump all definitions of all tests that cannot be defined earlier into src/test. The `executable` definitions are still at the top level, so the binaries are compiled into the build root. v5: - tag test-dnssec-complex as manual v6: - fix HAVE_LIBZ typo - add missing libgobject/libgio defs - mark test-qcow2 as manual
This commit is contained in:
parent
d68b342b03
commit
69e96427a2
@ -16,6 +16,7 @@ in_files = '''
|
||||
|
||||
support_url = get_option('support-url')
|
||||
support_sed = 's~%SUPPORT_URL%~@0@~'.format(support_url)
|
||||
build_catalog_dir = meson.current_build_dir()
|
||||
|
||||
foreach file : in_files
|
||||
custom_target(
|
||||
|
99
meson.build
99
meson.build
@ -789,6 +789,37 @@ if libacl.found()
|
||||
m4_defines += ['-DHAVE_ACL']
|
||||
endif
|
||||
|
||||
want_glib = get_option('glib')
|
||||
if want_glib != 'no'
|
||||
libglib = dependency('glib-2.0',
|
||||
version : '>= 2.22.0',
|
||||
required : want_glib == 'yes')
|
||||
libgobject = dependency('gobject-2.0',
|
||||
version : '>= 2.22.0',
|
||||
required : want_glib == 'yes')
|
||||
libgio = dependency('gio-2.0',
|
||||
required : want_glib == 'yes')
|
||||
if libglib.found() and libgobject.found() and libgio.found()
|
||||
conf.set('HAVE_GLIB', 1)
|
||||
endif
|
||||
else
|
||||
libglib = []
|
||||
libgobject = []
|
||||
libgio = []
|
||||
endif
|
||||
|
||||
want_dbus = get_option('dbus')
|
||||
if want_dbus != 'no'
|
||||
libdbus = dependency('dbus-1',
|
||||
version : '>= 1.3.2',
|
||||
required : want_dbus == 'yes')
|
||||
if libdbus.found()
|
||||
conf.set('HAVE_DBUS', 1)
|
||||
endif
|
||||
else
|
||||
libdbus = []
|
||||
endif
|
||||
|
||||
want_libgcrypt = get_option('libgcrypt')
|
||||
if want_libgcrypt != 'no'
|
||||
libgcrypt = cc.find_library('gcrypt', required : want_libgcrypt == 'yes')
|
||||
@ -860,6 +891,9 @@ foreach pair : [['utmp', 'HAVE_UTMP'],
|
||||
endif
|
||||
endforeach
|
||||
|
||||
want_tests = get_option('tests')
|
||||
tests = []
|
||||
|
||||
#####################################################################
|
||||
|
||||
if get_option('efi')
|
||||
@ -914,21 +948,8 @@ subdir('src/systemd')
|
||||
subdir('src/basic')
|
||||
subdir('src/libsystemd')
|
||||
subdir('src/libsystemd-network')
|
||||
subdir('src/analyze')
|
||||
subdir('src/coredump')
|
||||
subdir('src/hostname')
|
||||
subdir('src/import')
|
||||
subdir('src/journal')
|
||||
subdir('src/journal-remote')
|
||||
subdir('src/kernel-install')
|
||||
subdir('src/locale')
|
||||
subdir('src/login')
|
||||
subdir('src/machine')
|
||||
subdir('src/nspawn')
|
||||
subdir('src/resolve')
|
||||
subdir('src/timedate')
|
||||
subdir('src/timesync')
|
||||
subdir('src/vconsole')
|
||||
|
||||
libjournal_core = static_library(
|
||||
'journal-core',
|
||||
@ -993,6 +1014,22 @@ subdir('src/core')
|
||||
subdir('src/udev')
|
||||
subdir('src/network')
|
||||
|
||||
subdir('src/analyze')
|
||||
subdir('src/journal-remote')
|
||||
subdir('src/coredump')
|
||||
subdir('src/hostname')
|
||||
subdir('src/import')
|
||||
subdir('src/kernel-install')
|
||||
subdir('src/locale')
|
||||
subdir('src/machine')
|
||||
subdir('src/nspawn')
|
||||
subdir('src/resolve')
|
||||
subdir('src/timedate')
|
||||
subdir('src/timesync')
|
||||
subdir('src/vconsole')
|
||||
|
||||
subdir('src/test')
|
||||
|
||||
executable('systemd',
|
||||
systemd_sources,
|
||||
include_directories : includes,
|
||||
@ -1819,8 +1856,40 @@ executable('networkctl',
|
||||
install : true,
|
||||
install_dir : rootbindir)
|
||||
|
||||
executable('test-sizeof', 'src/test/test-sizeof.c',
|
||||
include_directories : includes)
|
||||
############################################################
|
||||
|
||||
foreach tuple : tests
|
||||
sources = tuple[0]
|
||||
link_with = tuple[1].length() > 0 ? tuple[1] : [libshared]
|
||||
dependencies = tuple[2]
|
||||
condition = tuple.length() >= 4 ? tuple[3] : ''
|
||||
type = tuple.length() >= 5 ? tuple[4] : ''
|
||||
defs = tuple.length() >= 6 ? tuple[5] : []
|
||||
incs = tuple.length() >= 7 ? tuple[6] : includes
|
||||
|
||||
name = sources[0].split('/')[-1].split('.')[0]
|
||||
|
||||
if condition == '' or conf.get(condition, 0) == 1
|
||||
exe = executable(
|
||||
name,
|
||||
sources,
|
||||
include_directories : incs,
|
||||
link_with : link_with,
|
||||
dependencies : dependencies,
|
||||
c_args : defs)
|
||||
if type == 'manual'
|
||||
message('@0@ is a manual test'.format(name))
|
||||
elif type == 'unsafe' and want_tests != 'unsafe'
|
||||
message('@0@ is an unsafe test'.format(name))
|
||||
else
|
||||
test(name, exe, env : test_env)
|
||||
endif
|
||||
else
|
||||
message('Not compiling @0@ because @1@ is not true'.format(name, condition))
|
||||
endif
|
||||
endforeach
|
||||
|
||||
############################################################
|
||||
|
||||
make_directive_index_py = find_program('tools/make-directive-index.py')
|
||||
make_man_index_py = find_program('tools/make-man-index.py')
|
||||
|
@ -189,8 +189,15 @@ option('xz', type : 'combo', choices : ['auto', 'yes', 'no'],
|
||||
description : 'xz compression support')
|
||||
option('lz4', type : 'combo', choices : ['auto', 'yes', 'no'],
|
||||
description : 'lz4 compression support')
|
||||
option('glib', type : 'combo', choices : ['auto', 'yes', 'no'],
|
||||
description : 'libglib support (for tests only)')
|
||||
option('dbus', type : 'combo', choices : ['auto', 'yes', 'no'],
|
||||
description : 'libdbus support (for tests only)')
|
||||
|
||||
option('bashcompletiondir', type : 'string',
|
||||
description : 'directory for bash completion scripts ["no" disables]')
|
||||
option('zshcompletiondir', type : 'string',
|
||||
description : 'directory for zsh completion scripts ["no" disables]')
|
||||
|
||||
option('tests', type : 'combo', choices : ['yes', 'unsafe'],
|
||||
description : 'enable extra tests with =unsafe')
|
||||
|
@ -15,3 +15,12 @@ coredumpctl_sources = files('coredumpctl.c')
|
||||
|
||||
install_data('coredump.conf',
|
||||
install_dir : pkgsysconfdir)
|
||||
|
||||
tests += [
|
||||
[['src/coredump/test-coredump-vacuum.c',
|
||||
'src/coredump/coredump-vacuum.c',
|
||||
'src/coredump/coredump-vacuum.h'],
|
||||
[],
|
||||
[],
|
||||
'ENABLE_COREDUMP', 'manual'],
|
||||
]
|
||||
|
@ -68,3 +68,12 @@ if conf.get('ENABLE_IMPORTD', 0) == 1
|
||||
install_dir : rootlibexecdir)
|
||||
# TODO: shouldn't this be in pkgdatadir?
|
||||
endif
|
||||
|
||||
tests += [
|
||||
[['src/import/test-qcow2.c',
|
||||
'src/import/qcow2-util.c',
|
||||
'src/import/qcow2-util.h'],
|
||||
[libshared],
|
||||
[libz],
|
||||
'HAVE_ZLIB', 'manual'],
|
||||
]
|
||||
|
@ -96,3 +96,95 @@ libsystemd_pc = configure_file(
|
||||
configuration : substs)
|
||||
install_data(libsystemd_pc,
|
||||
install_dir : pkgconfiglibdir)
|
||||
|
||||
tests += [
|
||||
[['src/libsystemd/sd-bus/test-bus-marshal.c'],
|
||||
[],
|
||||
[libglib,
|
||||
libgobject,
|
||||
libgio,
|
||||
libdbus]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-signature.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-chat.c'],
|
||||
[],
|
||||
[threads]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-cleanup.c'],
|
||||
[],
|
||||
[libseccomp]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-track.c'],
|
||||
[],
|
||||
[libseccomp]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-server.c'],
|
||||
[],
|
||||
[threads]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-objects.c'],
|
||||
[],
|
||||
[threads]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-error.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-gvariant.c'],
|
||||
[],
|
||||
[libglib,
|
||||
libgobject,
|
||||
libgio]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-creds.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-match.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-kernel.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-kernel-bloom.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-benchmark.c'],
|
||||
[],
|
||||
[threads]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-zero-copy.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-introspect.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd/sd-event/test-event.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd/sd-netlink/test-netlink.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd/sd-netlink/test-local-addresses.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd/sd-resolve/test-resolve.c'],
|
||||
[],
|
||||
[threads]],
|
||||
|
||||
[['src/libsystemd/sd-login/test-login.c'],
|
||||
[],
|
||||
[],
|
||||
'', 'manual'],
|
||||
]
|
||||
|
@ -23,6 +23,20 @@ if conf.get('ENABLE_LOCALED', 0) == 1
|
||||
install_dir : polkitpolicydir)
|
||||
endif
|
||||
|
||||
# If you know a way that allows the same variables to be used
|
||||
# in sources list and concatenated to a string for test_env,
|
||||
# let me know.
|
||||
kbd_model_map = meson.current_source_dir() + '/kbd-model-map'
|
||||
language_fallback_map = meson.current_source_dir() + '/language-fallback-map'
|
||||
|
||||
install_data('kbd-model-map',
|
||||
'language-fallback-map',
|
||||
install_dir : pkgdatadir)
|
||||
|
||||
tests += [
|
||||
[['src/locale/test-keymap-util.c',
|
||||
'src/locale/keymap-util.c',
|
||||
'src/locale/keymap-util.h'],
|
||||
[libshared],
|
||||
[libdl]],
|
||||
]
|
||||
|
@ -37,3 +37,11 @@ if conf.get('ENABLE_MACHINED', 0) == 1
|
||||
install : true,
|
||||
install_dir : polkitpolicydir)
|
||||
endif
|
||||
|
||||
tests += [
|
||||
[['src/machine/test-machine-tables.c'],
|
||||
[libmachine_core,
|
||||
libshared],
|
||||
[],
|
||||
'ENABLE_MACHINED'],
|
||||
]
|
||||
|
@ -73,6 +73,8 @@ systemd_networkd_wait_online_sources = files('''
|
||||
|
||||
networkctl_sources = files('networkctl.c')
|
||||
|
||||
network_include_dir = include_directories('.')
|
||||
|
||||
if conf.get('ENABLE_NETWORKD', 0) == 1
|
||||
networkd_gperf_c = custom_target(
|
||||
'networkd-gperf.c',
|
||||
@ -109,3 +111,29 @@ if conf.get('ENABLE_NETWORKD', 0) == 1
|
||||
install_data('systemd-networkd.rules',
|
||||
install_dir : polkitrulesdir)
|
||||
endif
|
||||
|
||||
tests += [
|
||||
[['src/network/test-networkd-conf.c'],
|
||||
[libnetworkd_core,
|
||||
libsystemd_network],
|
||||
[]],
|
||||
|
||||
[['src/network/test-network.c'],
|
||||
[libnetworkd_core,
|
||||
libudev_internal,
|
||||
libsystemd_network,
|
||||
libfirewall],
|
||||
[libiptc]],
|
||||
|
||||
[['src/network/test-network-tables.c',
|
||||
'src/network/test-network-tables.c',
|
||||
test_tables_h],
|
||||
[libnetworkd_core,
|
||||
libudev_internal,
|
||||
libudev_core,
|
||||
libsystemd_network,
|
||||
libfirewall],
|
||||
[],
|
||||
'', '', [],
|
||||
[network_include_dir] + libudev_core_includes],
|
||||
]
|
||||
|
@ -31,3 +31,12 @@ nspawn_gperf_c = custom_target(
|
||||
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
|
||||
|
||||
systemd_nspawn_sources += [nspawn_gperf_c]
|
||||
|
||||
tests += [
|
||||
[['src/nspawn/test-patch-uid.c',
|
||||
'src/nspawn/nspawn-patch-uid.c',
|
||||
'src/nspawn/nspawn-patch-uid.h'],
|
||||
[libshared],
|
||||
[libacl],
|
||||
'', 'manual'],
|
||||
]
|
||||
|
@ -143,3 +143,37 @@ endif
|
||||
|
||||
install_data('resolv.conf',
|
||||
install_dir : rootlibexecdir)
|
||||
|
||||
tests += [
|
||||
[['src/resolve/test-resolve-tables.c',
|
||||
basic_dns_sources,
|
||||
dns_type_headers,
|
||||
'src/shared/test-tables.h'],
|
||||
[libshared],
|
||||
[libgcrypt,
|
||||
libm],
|
||||
'ENABLE_RESOLVED'],
|
||||
|
||||
[['src/resolve/test-dns-packet.c',
|
||||
basic_dns_sources,
|
||||
dns_type_headers],
|
||||
[libshared],
|
||||
[libgcrypt,
|
||||
libm],
|
||||
'ENABLE_RESOLVED'],
|
||||
|
||||
[['src/resolve/test-dnssec.c',
|
||||
basic_dns_sources,
|
||||
dns_type_headers],
|
||||
[libshared],
|
||||
[libgcrypt,
|
||||
libm],
|
||||
'ENABLE_RESOLVED'],
|
||||
|
||||
[['src/resolve/test-dnssec-complex.c',
|
||||
'src/resolve/dns-type.c',
|
||||
dns_type_headers],
|
||||
[libshared],
|
||||
[],
|
||||
'ENABLE_RESOLVED', 'manual'],
|
||||
]
|
||||
|
@ -89,7 +89,6 @@ shared_sources = '''
|
||||
sysctl-util.h
|
||||
tests.c
|
||||
tests.h
|
||||
test-tables.h
|
||||
udev-util.h
|
||||
uid-range.c
|
||||
uid-range.h
|
||||
@ -102,6 +101,9 @@ shared_sources = '''
|
||||
watchdog.h
|
||||
'''.split()
|
||||
|
||||
test_tables_h = files('test-tables.h')
|
||||
shared_sources += [test_tables_h]
|
||||
|
||||
if conf.get('HAVE_ACL', 0) == 1
|
||||
shared_sources += ['acl-util.c']
|
||||
endif
|
||||
|
699
src/test/meson.build
Normal file
699
src/test/meson.build
Normal file
@ -0,0 +1,699 @@
|
||||
# -*- mode: meson -*-
|
||||
|
||||
awkscript = 'test-hashmap-ordered.awk'
|
||||
test_hashmap_ordered_c = custom_target(
|
||||
'test-hashmap-ordered.c',
|
||||
input : [awkscript, 'test-hashmap-plain.c'],
|
||||
output : 'test-hashmap-ordered.c',
|
||||
command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
|
||||
capture : true)
|
||||
|
||||
test_include_dir = include_directories('.')
|
||||
|
||||
path = run_command('sh', ['-c', 'echo "$PATH"']).stdout()
|
||||
test_env = environment()
|
||||
test_env.set('SYSTEMD_KBD_MODEL_MAP', kbd_model_map)
|
||||
test_env.set('SYSTEMD_LANGUAGE_FALLBACK_MAP', language_fallback_map)
|
||||
test_env.set('PATH', path)
|
||||
test_env.prepend('PATH', meson.build_root())
|
||||
|
||||
tests += [
|
||||
[['src/test/test-device-nodes.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-engine.c'],
|
||||
[libcore],
|
||||
[librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount]],
|
||||
|
||||
[['src/test/test-job-type.c'],
|
||||
[libcore],
|
||||
[librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount]],
|
||||
|
||||
[['src/test/test-ns.c'],
|
||||
[libcore],
|
||||
[librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount],
|
||||
'', 'unsafe'],
|
||||
|
||||
[['src/test/test-loopback.c'],
|
||||
[libcore],
|
||||
[librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount]],
|
||||
|
||||
[['src/test/test-hostname.c'],
|
||||
[libcore],
|
||||
[librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount],
|
||||
'', 'unsafe'],
|
||||
|
||||
[['src/test/test-dns-domain.c'],
|
||||
[libcore,
|
||||
libsystemd_network],
|
||||
[]],
|
||||
|
||||
[['src/test/test-boot-timestamps.c'],
|
||||
[libshared],
|
||||
[],
|
||||
'ENABLE_EFI'],
|
||||
|
||||
[['src/test/test-unit-name.c'],
|
||||
[libcore],
|
||||
[librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount]],
|
||||
|
||||
[['src/test/test-unit-file.c'],
|
||||
[libcore],
|
||||
[librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount]],
|
||||
|
||||
[['src/test/test-utf8.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-capability.c'],
|
||||
[libshared],
|
||||
[libcap]],
|
||||
|
||||
[['src/test/test-async.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-locale-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-copy.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-sigbus.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-condition.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-fdset.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-fstab-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-ratelimit.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-mount-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-exec-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-hexdecoct.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-alloc-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-xattr-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-io-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-glob-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-fs-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-proc-cmdline.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-fd-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-web-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-cpu-set-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-stat-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-escape.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-string-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-extract-word.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-parse-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-user-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-hostname-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-process-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-terminal-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-path-lookup.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-uid-range.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-cap-list.c',
|
||||
generated_gperf_headers],
|
||||
[libshared],
|
||||
[libcap]],
|
||||
|
||||
[['src/test/test-socket-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-barrier.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-tmpfiles.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-namespace.c'],
|
||||
[libcore],
|
||||
[]],
|
||||
|
||||
[['src/test/test-verbs.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-install-root.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-acl-util.c'],
|
||||
[libshared],
|
||||
[],
|
||||
'HAVE_ACL'],
|
||||
|
||||
[['src/test/test-seccomp.c'],
|
||||
[libshared],
|
||||
[libseccomp],
|
||||
'HAVE_SECCOMP'],
|
||||
|
||||
[['src/test/test-rlimit-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-ask-password-api.c'],
|
||||
[libshared],
|
||||
[],
|
||||
'', 'manual'],
|
||||
|
||||
[['src/test/test-dissect-image.c'],
|
||||
[libshared],
|
||||
[libblkid],
|
||||
'', 'manual'],
|
||||
|
||||
[['src/test/test-signal-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-selinux.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-sizeof.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-hashmap.c',
|
||||
'src/test/test-hashmap-plain.c',
|
||||
test_hashmap_ordered_c],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-set.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-bitmap.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-xml.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-list.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-unaligned.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-tables.c',
|
||||
'src/shared/test-tables.h',
|
||||
'src/journal/journald-server.c',
|
||||
'src/journal/journald-server.h'],
|
||||
[libcore,
|
||||
libjournal_core,
|
||||
libudev_core,
|
||||
libudev_internal,
|
||||
libsystemd_network],
|
||||
[threads,
|
||||
libseccomp,
|
||||
libmount,
|
||||
libxz,
|
||||
liblz4],
|
||||
'', '', [], libudev_core_includes],
|
||||
|
||||
[['src/test/test-prioq.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-fileio.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-time.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-clock.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-architecture.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-log.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-ipcrm.c'],
|
||||
[libshared],
|
||||
[],
|
||||
'', 'unsafe'],
|
||||
|
||||
[['src/test/test-btrfs.c'],
|
||||
[libshared],
|
||||
[],
|
||||
'', 'manual'],
|
||||
|
||||
|
||||
[['src/test/test-firewall-util.c'],
|
||||
[libfirewall,
|
||||
libshared],
|
||||
[],
|
||||
'HAVE_LIBIPTC'],
|
||||
|
||||
[['src/test/test-netlink-manual.c'],
|
||||
[libshared],
|
||||
[libkmod],
|
||||
'', 'manual'],
|
||||
|
||||
[['src/test/test-ellipsize.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-date.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-sleep.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-replace-var.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-calendarspec.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-strip-tab-ansi.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-daemon.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-cgroup.c'],
|
||||
[libshared],
|
||||
[],
|
||||
'', 'manual'],
|
||||
|
||||
|
||||
[['src/test/test-cgroup-mask.c'],
|
||||
[libcore],
|
||||
[librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount]],
|
||||
|
||||
[['src/test/test-cgroup-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-env-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-strbuf.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-strv.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-path-util.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-path.c'],
|
||||
[libcore],
|
||||
[librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount]],
|
||||
|
||||
[['src/test/test-execute.c'],
|
||||
[libcore],
|
||||
[librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount]],
|
||||
|
||||
[['src/test/test-siphash24.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-strxcpyx.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-install.c'],
|
||||
[libcore],
|
||||
[],
|
||||
'', 'manual'],
|
||||
|
||||
[['src/test/test-watchdog.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-sched-prio.c'],
|
||||
[libcore],
|
||||
[librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount]],
|
||||
|
||||
[['src/test/test-conf-files.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-conf-parser.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-af-list.c',
|
||||
generated_gperf_headers],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-arphrd-list.c',
|
||||
generated_gperf_headers],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-journal-importer.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-libudev.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-udev.c'],
|
||||
[libudev_core,
|
||||
libudev_internal,
|
||||
libsystemd_network,
|
||||
libshared],
|
||||
[librt,
|
||||
libblkid,
|
||||
libkmod,
|
||||
libacl],
|
||||
'', 'manual'],
|
||||
|
||||
[['src/test/test-id128.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-hash.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/test/test-nss.c'],
|
||||
[libshared],
|
||||
[libdl],
|
||||
'', 'manual'],
|
||||
]
|
||||
|
||||
############################################################
|
||||
|
||||
# define some tests here, because the link_with deps were not defined earlier
|
||||
|
||||
tests += [
|
||||
[['src/journal/test-journal.c'],
|
||||
[libjournal_core],
|
||||
[threads,
|
||||
libxz,
|
||||
liblz4]],
|
||||
|
||||
[['src/journal/test-journal-send.c'],
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[]],
|
||||
|
||||
[['src/journal/test-journal-syslog.c'],
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[threads,
|
||||
libxz,
|
||||
liblz4]],
|
||||
|
||||
[['src/journal/test-journal-match.c'],
|
||||
[libshared],
|
||||
[threads,
|
||||
libxz,
|
||||
liblz4]],
|
||||
|
||||
[['src/journal/test-journal-enum.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/journal/test-journal-stream.c'],
|
||||
[libshared],
|
||||
[threads,
|
||||
libxz,
|
||||
liblz4]],
|
||||
|
||||
[['src/journal/test-journal-flush.c'],
|
||||
[libshared],
|
||||
[threads,
|
||||
libxz,
|
||||
liblz4]],
|
||||
|
||||
[['src/journal/test-journal-init.c'],
|
||||
[libshared],
|
||||
[threads,
|
||||
libxz,
|
||||
liblz4]],
|
||||
|
||||
[['src/journal/test-journal-verify.c'],
|
||||
[libshared],
|
||||
[threads,
|
||||
libxz,
|
||||
liblz4]],
|
||||
|
||||
[['src/journal/test-journal-interleaving.c'],
|
||||
[libshared],
|
||||
[threads,
|
||||
libxz,
|
||||
liblz4]],
|
||||
|
||||
[['src/journal/test-mmap-cache.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/journal/test-catalog.c'],
|
||||
[libshared],
|
||||
[],
|
||||
'', '', '-DCATALOG_DIR="@0@"'.format(build_catalog_dir)],
|
||||
|
||||
[['src/journal/test-compress.c'],
|
||||
[libshared],
|
||||
[liblz4,
|
||||
libxz]],
|
||||
|
||||
[['src/journal/test-compress-benchmark.c'],
|
||||
[libshared],
|
||||
[liblz4,
|
||||
libxz]],
|
||||
|
||||
[['src/journal/test-audit-type.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
]
|
||||
|
||||
############################################################
|
||||
|
||||
tests += [
|
||||
[['src/libsystemd-network/test-dhcp-option.c',
|
||||
'src/libsystemd-network/dhcp-protocol.h',
|
||||
'src/libsystemd-network/dhcp-internal.h'],
|
||||
[libshared,
|
||||
libsystemd_network],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd-network/test-dhcp-client.c',
|
||||
'src/libsystemd-network/dhcp-protocol.h',
|
||||
'src/libsystemd-network/dhcp-internal.h',
|
||||
'src/systemd/sd-dhcp-client.h'],
|
||||
[libshared,
|
||||
libsystemd_network],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd-network/test-dhcp-server.c'],
|
||||
[libshared,
|
||||
libsystemd_network],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd-network/test-ipv4ll.c',
|
||||
'src/libsystemd-network/arp-util.h',
|
||||
'src/systemd/sd-ipv4ll.h'],
|
||||
[libshared,
|
||||
libsystemd_network],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd-network/test-ipv4ll-manual.c',
|
||||
'src/systemd/sd-ipv4ll.h'],
|
||||
[libshared,
|
||||
libsystemd_network],
|
||||
[],
|
||||
'', 'manual'],
|
||||
|
||||
[['src/libsystemd-network/test-acd.c',
|
||||
'src/systemd/sd-ipv4acd.h'],
|
||||
[libshared,
|
||||
libsystemd_network],
|
||||
[],
|
||||
'', 'manual'],
|
||||
|
||||
[['src/libsystemd-network/test-ndisc-rs.c',
|
||||
'src/libsystemd-network/dhcp-identifier.h',
|
||||
'src/libsystemd-network/dhcp-identifier.c',
|
||||
'src/libsystemd-network/icmp6-util.h',
|
||||
'src/systemd/sd-dhcp6-client.h',
|
||||
'src/systemd/sd-ndisc.h'],
|
||||
[libshared,
|
||||
libsystemd_network,
|
||||
libudev],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd-network/test-dhcp6-client.c',
|
||||
'src/libsystemd-network/dhcp-identifier.h',
|
||||
'src/libsystemd-network/dhcp-identifier.c',
|
||||
'src/libsystemd-network/dhcp6-internal.h',
|
||||
'src/systemd/sd-dhcp6-client.h'],
|
||||
[libshared,
|
||||
libsystemd_network,
|
||||
libudev],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd-network/test-lldp.c'],
|
||||
[libshared,
|
||||
libsystemd_network],
|
||||
[]],
|
||||
]
|
||||
|
||||
############################################################
|
||||
|
||||
tests += [
|
||||
[['src/login/test-login-shared.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/login/test-inhibit.c'],
|
||||
[libshared],
|
||||
[],
|
||||
'', 'manual'],
|
||||
|
||||
[['src/login/test-login-tables.c'],
|
||||
[liblogind_core,
|
||||
libshared],
|
||||
[]],
|
||||
]
|
11
src/test/test-hashmap-ordered.awk
Normal file
11
src/test/test-hashmap-ordered.awk
Normal file
@ -0,0 +1,11 @@
|
||||
BEGIN {
|
||||
print "/* GENERATED FILE */";
|
||||
print "#define ORDERED"
|
||||
}
|
||||
{
|
||||
if (!match($0, "^#include"))
|
||||
gsub(/hashmap/, "ordered_hashmap");
|
||||
gsub(/HASHMAP/, "ORDERED_HASHMAP");
|
||||
gsub(/Hashmap/, "OrderedHashmap");
|
||||
print
|
||||
}
|
@ -92,12 +92,13 @@ link_config_gperf_c = custom_target(
|
||||
|
||||
############################################################
|
||||
|
||||
libudev_core_includes = [includes, include_directories('net')]
|
||||
libudev_core = static_library(
|
||||
'udev-core',
|
||||
libudev_core_sources,
|
||||
link_config_gperf_c,
|
||||
keyboard_keys_from_name_h,
|
||||
include_directories : [includes, include_directories('net')],
|
||||
include_directories : libudev_core_includes,
|
||||
link_with : [libshared])
|
||||
|
||||
executable('ata_id',
|
||||
|
Loading…
Reference in New Issue
Block a user