diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2019-08-02 11:18:17 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2019-08-05 09:16:24 +0200 |
commit | ea5fb8e96e2ec46e12f1e36461634806c4c5598c (patch) | |
tree | b9b1ca4a57f99c622c6e1718b3d43e610e507a25 | |
parent | ed087445905d9dddb85421217306ce5ad829efd4 (diff) | |
download | NetworkManager-ea5fb8e96e2ec46e12f1e36461634806c4c5598c.tar.gz |
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
-rw-r--r-- | shared/meson.build | 24 | ||||
-rw-r--r-- | shared/nm-utils/tests/meson.build | 22 |
2 files changed, 25 insertions, 21 deletions
diff --git a/shared/meson.build b/shared/meson.build index af903d3c8a..d542804eb4 100644 --- a/shared/meson.build +++ b/shared/meson.build @@ -330,24 +330,6 @@ libnm_systemd_shared_no_logging_dep = declare_dependency( ], ) -############################################################################### - -exe = executable( - '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()] -) +if enable_tests + subdir('nm-utils/tests') +endif diff --git a/shared/nm-utils/tests/meson.build b/shared/nm-utils/tests/meson.build new file mode 100644 index 0000000000..e0560f296d --- /dev/null +++ b/shared/nm-utils/tests/meson.build @@ -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, +) |