NetworkManager/libnm-util/tests/meson.build
Beniamino Galvani 0136915211 build: meson: add prefix to test names
There are multiple tests with the same in different directories; add a
unique prefix to test names so that it is clear from the output which
one is running.
2018-04-12 09:21:10 +02:00

47 lines
956 B
Meson

deps = [
dbus_dep,
dbus_glib_dep,
libnm_util_dep,
shared_dep
]
cflags = common_cflags + [
'-DBUILD_DIR="@0@"'.format(meson.current_build_dir()),
'-DTEST_CERT_DIR="@0@"'.format(test_cert_dir),
'-DNETWORKMANAGER_COMPILATION_TEST',
]
test = 'test-libnm-linking'
test_libnm_linking = executable(
test,
test + '.c',
dependencies: deps + [libnm_dep],
c_args: cflags
)
test_units = [
['test-crypto', [libtest_crypto], []],
['test-general', [], [test_libnm_linking]],
['test-secrets', [], []],
['test-setting-8021x', [], []],
['test-setting-dcb', [], []],
['test-settings-defaults', [], []]
]
foreach test_unit: test_units
exe = executable(
'libnm-util-' + test_unit[0],
test_unit[0] + '.c',
dependencies: deps,
c_args: cflags,
link_with: test_unit[1],
link_depends: test_unit[2]
)
test(
'libnm-util/' + test_unit[0],
test_script,
args: test_args + [exe.full_path()]
)
endforeach