diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2019-11-19 16:43:49 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2019-11-19 17:00:22 +0100 |
commit | eeb1ce85665c89cc5aa90c3a5a162ce255db91cb (patch) | |
tree | 93be1c1610602b1eb1d6c64ce6c780bdbb406bea | |
parent | c68c199eda0f024ccf97bfce7fe4f9069ec78fa1 (diff) | |
download | NetworkManager-eeb1ce85665c89cc5aa90c3a5a162ce255db91cb.tar.gz |
bluetooth: build test program only when tests are enabled
The manual test should only be built when tests are enabled since it
links to the test library.
Fixes: 05c7a7702277 ('meson: Add missing "nm-bt-test" helper program')
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/287
-rw-r--r-- | src/devices/bluetooth/meson.build | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/devices/bluetooth/meson.build b/src/devices/bluetooth/meson.build index 63c47bcba9..a77ad60d46 100644 --- a/src/devices/bluetooth/meson.build +++ b/src/devices/bluetooth/meson.build @@ -35,11 +35,13 @@ test( args: [libnm_device_plugin_bluetooth.full_path(), linker_script_devices], ) -test_unit = 'nm-bt-test' - -executable( - test_unit, - 'tests/' + test_unit + '.c', - dependencies: libnetwork_manager_test_dep, - c_args: test_c_flags, -) +if enable_tests + test_unit = 'nm-bt-test' + + executable( + test_unit, + 'tests/' + test_unit + '.c', + dependencies: libnetwork_manager_test_dep, + c_args: test_c_flags, + ) +endif |