diff options
author | Iñigo Martínez <inigomartinez@gmail.com> | 2019-09-11 23:39:48 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-10-01 09:49:33 +0200 |
commit | 2172b885b4d0ee15ae572d26c2016b6a4f957e61 (patch) | |
tree | 1f87ebf6ad657938e14087bea14f55115d07b0d4 | |
parent | 7e1aacaef253b7b58b099924a14d9c03868cbad2 (diff) | |
download | NetworkManager-2172b885b4d0ee15ae572d26c2016b6a4f957e61.tar.gz |
meson: Improve the wwan test build file
The test unit name string is used in different place so it has been
replaced by a variable.
The `nm-service-providers.c` source file is appended by using a
`files` generated object.
-rw-r--r-- | src/devices/wwan/meson.build | 5 | ||||
-rw-r--r-- | src/devices/wwan/tests/meson.build | 10 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/devices/wwan/meson.build b/src/devices/wwan/meson.build index 37d3c2ca4e..7f0ca27f04 100644 --- a/src/devices/wwan/meson.build +++ b/src/devices/wwan/meson.build @@ -1,8 +1,9 @@ -sources = files( +nm_service_providers_source = files('nm-service-providers.c') + +sources = nm_service_providers_source + files( 'nm-modem-broadband.c', 'nm-modem.c', 'nm-modem-manager.c', - 'nm-service-providers.c', ) deps = [ diff --git a/src/devices/wwan/tests/meson.build b/src/devices/wwan/tests/meson.build index a61fb81782..e165c5482b 100644 --- a/src/devices/wwan/tests/meson.build +++ b/src/devices/wwan/tests/meson.build @@ -1,13 +1,15 @@ +test_unit = 'test-service-providers' + exe = executable( - 'test-service-providers', - sources: files('test-service-providers.c', - '../nm-service-providers.c'), + test_unit, + [test_unit + '.c'] + nm_service_providers_source, include_directories: wwan_inc, dependencies: libnetwork_manager_test_dep, c_args: test_c_flags, ) + test( - 'wwan/test-service-providers', + 'wwan/' + test_unit, test_script, timeout: default_test_timeout, args: test_args + [exe.full_path()], |