mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 12:30:07 +01:00
Use two common defines NM_BUILD_SRCDIR and NM_BUILD_BUILDDIR for specifying the location of srcdir and builddir. Note that this is only relevant for tests, as they expect a certain layout of the directories, to find files that concern them.
45 lines
868 B
Meson
45 lines
868 B
Meson
deps = [
|
|
dbus_dep,
|
|
dbus_glib_dep,
|
|
libnm_util_dep,
|
|
shared_dep
|
|
]
|
|
|
|
cflags = common_cflags + [
|
|
'-DNETWORKMANAGER_COMPILATION_TEST',
|
|
] + nm_build_cflags
|
|
|
|
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
|