summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIñigo Martínez <inigomartinez@gmail.com>2019-09-11 12:12:26 +0200
committerThomas Haller <thaller@redhat.com>2019-10-01 09:49:33 +0200
commitf5d74ce179732f8511dcd8e61074acaf56826fd1 (patch)
treed9af3403855b6dba63f048d2ea96b9e8a7b50b64
parent83b760cf98b32ddfa5fa2846c76a99993ecf3183 (diff)
downloadNetworkManager-f5d74ce179732f8511dcd8e61074acaf56826fd1.tar.gz
meson: Improve the client common test build file
The build file in the `client` `common` directory has been improved by grouping the objects used in properties and by reviewing the dependencies used by tests built. Finally the indentation has also been fixed.
-rw-r--r--clients/common/tests/meson.build41
1 files changed, 19 insertions, 22 deletions
diff --git a/clients/common/tests/meson.build b/clients/common/tests/meson.build
index ea46de50a0..479cb78101 100644
--- a/clients/common/tests/meson.build
+++ b/clients/common/tests/meson.build
@@ -1,26 +1,26 @@
+common_c_flags = clients_c_flags + ['-DNETWORKMANAGER_COMPILATION_TEST']
+
test_name = 'test-clients-common'
+deps = [
+ libnmc_base_dep,
+ libnmc_dep,
+]
+
exe = executable(
test_name,
test_name + '.c',
- dependencies: [
- libnm_dep,
- libnmc_dep,
- libnmc_base_dep,
- libnm_nm_default_dep,
- ],
- c_args: clients_c_flags + [
- '-DNETWORKMANAGER_COMPILATION_TEST',
- ],
+ dependencies: deps,
+ c_args: common_c_flags,
)
test(
- test_name,
+ 'clients/common/tests/' + test_name,
test_script,
args: test_args + [exe.full_path()],
)
-###############################################################################
+test_name = 'test-libnm-core-aux'
deps = [
libnm_dep,
@@ -29,18 +29,15 @@ deps = [
]
exe = executable(
- 'test-libnm-core-aux',
- [ 'test-libnm-core-aux.c', ],
- c_args: [
- '-DNETWORKMANAGER_COMPILATION_TEST',
- '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
- ],
- dependencies: deps,
- link_with: libnm_systemd_logging_stub,
+ test_name,
+ test_name + '.c',
+ dependencies: deps,
+ c_args: common_c_flags,
+ link_with: libnm_systemd_logging_stub,
)
test(
- 'clients/common/tests/test-libnm-core-aux',
- test_script,
- args: test_args + [exe.full_path()]
+ 'clients/common/tests/' + test_name,
+ test_script,
+ args: test_args + [exe.full_path()]
)