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: 05c7a77022 ('meson: Add missing "nm-bt-test" helper program')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/287
This commit is contained in:
Beniamino Galvani 2019-11-19 16:43:49 +01:00
parent c68c199eda
commit eeb1ce8566

View file

@ -35,11 +35,13 @@ test(
args: [libnm_device_plugin_bluetooth.full_path(), linker_script_devices],
)
test_unit = 'nm-bt-test'
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,
)
executable(
test_unit,
'tests/' + test_unit + '.c',
dependencies: libnetwork_manager_test_dep,
c_args: test_c_flags,
)
endif