diff options
author | Iñigo Martínez <inigomartinez@gmail.com> | 2017-12-14 17:03:34 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-12-14 20:07:38 +0100 |
commit | d8493662300f40c350bdc85b6fad924dd28eb049 (patch) | |
tree | cd020e096e957b44d6903ed0b6de9717c3492061 | |
parent | 8e009baa107698c25131b28092b2ba71e1c66f25 (diff) |
build: rename unit tests with the `test-` pattern
There are some tests located in different directories which are
using the same name. To avoid any confussion a prefix was used to
name the test and the target.
This patch uses the prefix just for the target, to avoid any
collision that may happen, and uses the `test-` pattern as the
name.
https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00051.html
-rw-r--r-- | clients/common/tests/meson.build | 6 | ||||
-rw-r--r-- | libnm-core/tests/meson.build | 6 | ||||
-rw-r--r-- | libnm-glib/tests/meson.build | 6 | ||||
-rw-r--r-- | libnm-util/tests/meson.build | 6 | ||||
-rw-r--r-- | libnm/tests/meson.build | 6 | ||||
-rw-r--r-- | src/devices/wifi/tests/meson.build | 6 | ||||
-rw-r--r-- | src/platform/tests/meson.build | 6 | ||||
-rw-r--r-- | src/tests/meson.build | 11 |
8 files changed, 18 insertions, 35 deletions
diff --git a/clients/common/tests/meson.build b/clients/common/tests/meson.build index a60a7a46fe..84777011b1 100644 --- a/clients/common/tests/meson.build +++ b/clients/common/tests/meson.build @@ -1,18 +1,16 @@ test_unit = 'test-general' -name = 'client-' + test_unit - deps += [ libnmc_dep, libnmc_base_dep ] exe = executable( - name, + 'clients-' + test_unit, test_unit + '.c', include_directories: incs, dependencies: deps, c_args: cflags ) -test(name, exe) +test(test_unit, exe) diff --git a/libnm-core/tests/meson.build b/libnm-core/tests/meson.build index 92ecd22330..490999327c 100644 --- a/libnm-core/tests/meson.build +++ b/libnm-core/tests/meson.build @@ -50,10 +50,8 @@ test_cert_dir = join_paths(meson.current_source_dir(), 'certs') cflags = '-DTEST_CERT_DIR="@0@"'.format(test_cert_dir) foreach test_unit: test_units - name = 'libnm-core-' + test_unit - exe = executable( - name, + 'libnm-core-' + test_unit, [test_unit + '.c', enums_c, enums_h], include_directories: incs, dependencies: glib_dep, @@ -61,5 +59,5 @@ foreach test_unit: test_units link_with: libnm_core ) - test(name, exe) + test(test_unit, exe) endforeach diff --git a/libnm-glib/tests/meson.build b/libnm-glib/tests/meson.build index 8e0fc7bb1d..525c3b321c 100644 --- a/libnm-glib/tests/meson.build +++ b/libnm-glib/tests/meson.build @@ -22,15 +22,13 @@ test_units = [ ] foreach test_unit: test_units - name = 'libnm-glib-' + test_unit - exe = executable( - name, + test_unit, [test_unit + '.c', libnm_utils_enums_h] + shared_test_utils, include_directories: incs, dependencies: deps, c_args: cflags ) - test(name, exe) + test(test_unit, exe) endforeach diff --git a/libnm-util/tests/meson.build b/libnm-util/tests/meson.build index 8a05bc88c5..15dd3a3439 100644 --- a/libnm-util/tests/meson.build +++ b/libnm-util/tests/meson.build @@ -35,10 +35,8 @@ test_units = [ ] foreach test_unit: test_units - name = 'libnm-utils-' + test_unit[0] - exe = executable( - name, + 'libnm-util-' + test_unit[0], [test_unit[0] + '.c', libnm_utils_enums_h], include_directories: incs, dependencies: deps, @@ -47,5 +45,5 @@ foreach test_unit: test_units link_depends: test_unit[2] ) - test(name, exe) + test(test_unit[0], exe) endforeach diff --git a/libnm/tests/meson.build b/libnm/tests/meson.build index 28f91772f5..57791cedea 100644 --- a/libnm/tests/meson.build +++ b/libnm/tests/meson.build @@ -23,10 +23,8 @@ cflags = [ ] foreach test_unit: test_units - name = 'libnm-' + test_unit[0] - exe = executable( - name, + 'libnm-' + test_unit[0], [test_unit[0] + '.c'] + test_unit[1], include_directories: incs, dependencies: deps, @@ -34,7 +32,7 @@ foreach test_unit: test_units link_with: test_unit[2] ) - test(name, exe) + test(test_unit[0], exe) endforeach incs = [ diff --git a/src/devices/wifi/tests/meson.build b/src/devices/wifi/tests/meson.build index 3dfa1a21e8..189c1a730e 100644 --- a/src/devices/wifi/tests/meson.build +++ b/src/devices/wifi/tests/meson.build @@ -1,11 +1,9 @@ test_unit = 'test-general' -name = 'wifi-' + test_unit - exe = executable( - name, + 'wifi-' + test_unit, [test_unit + '.c'] + common_sources, dependencies: test_core_dep ) -test(name, exe) +test(test_unit, exe) diff --git a/src/platform/tests/meson.build b/src/platform/tests/meson.build index e8b9ca56b6..c7c5c855f7 100644 --- a/src/platform/tests/meson.build +++ b/src/platform/tests/meson.build @@ -12,16 +12,14 @@ test_units = [ ] foreach test_unit: test_units - name = 'platform-' + test_unit[0] - exe = executable( - name, + 'platform-' + test_unit[0], test_unit[1], dependencies: test_core_dep, c_args: test_cflags_platform ) - test(name, exe) + test(test_unit[0], exe) endforeach test = 'monitor' diff --git a/src/tests/meson.build b/src/tests/meson.build index e65b83d1b7..c30a9b8c6f 100644 --- a/src/tests/meson.build +++ b/src/tests/meson.build @@ -12,24 +12,21 @@ test_units = [ ] foreach test_unit: test_units - name = 'tests-' + test_unit - exe = executable( - name, + test_unit, test_unit + '.c', dependencies: test_core_dep ) - test(name, exe) + test(test_unit, exe) endforeach test_unit = 'test-systemd' -name = 'tests-' + test_unit cflags = '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD' exe = executable( - name, + test_unit, [test_unit + '.c', libnm_core_enums_h] + shared_siphash, include_directories: core_incs, dependencies: glib_dep, @@ -37,4 +34,4 @@ exe = executable( link_with: libsystemd_nm ) -test(name, exe) +test(test_unit, exe) |