build: fix meson warning about path separator in target
Fix the following: WARNING: Target "nm-utils/tests/test-shared-general" has a path separator in its name. This is not supported, it can cause unexpected failures and will become a hard error in the future. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/217
This commit is contained in:
@@ -330,24 +330,6 @@ libnm_systemd_shared_no_logging_dep = declare_dependency(
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
###############################################################################
|
if enable_tests
|
||||||
|
subdir('nm-utils/tests')
|
||||||
exe = executable(
|
endif
|
||||||
'nm-utils/tests/test-shared-general',
|
|
||||||
[ 'nm-utils/tests/test-shared-general.c' ],
|
|
||||||
c_args: [
|
|
||||||
'-DNETWORKMANAGER_COMPILATION_TEST',
|
|
||||||
'-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_PROG)',
|
|
||||||
],
|
|
||||||
dependencies: [
|
|
||||||
shared_nm_glib_aux_dep,
|
|
||||||
libnm_systemd_shared_no_logging_dep,
|
|
||||||
shared_c_siphash_dep,
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
test(
|
|
||||||
'shared/nm-utils/tests/test-shared-general',
|
|
||||||
test_script,
|
|
||||||
args: test_args + [exe.full_path()]
|
|
||||||
)
|
|
||||||
|
22
shared/nm-utils/tests/meson.build
Normal file
22
shared/nm-utils/tests/meson.build
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
test_unit = 'test-shared-general'
|
||||||
|
|
||||||
|
exe = executable(
|
||||||
|
test_unit,
|
||||||
|
test_unit + '.c',
|
||||||
|
c_args: [
|
||||||
|
'-DNETWORKMANAGER_COMPILATION_TEST',
|
||||||
|
'-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_PROG)',
|
||||||
|
],
|
||||||
|
dependencies: [
|
||||||
|
shared_nm_glib_aux_dep,
|
||||||
|
libnm_systemd_shared_no_logging_dep,
|
||||||
|
shared_c_siphash_dep,
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
test(
|
||||||
|
'shared/nm-utils/' + test_unit,
|
||||||
|
test_script,
|
||||||
|
args: test_args + [exe.full_path()],
|
||||||
|
timeout: default_test_timeout,
|
||||||
|
)
|
Reference in New Issue
Block a user