diff --git a/Makefile.am b/Makefile.am index 3cae931805..50b0738eec 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3399,7 +3399,6 @@ EXTRA_DIST += \ src/devices/wwan/libnm-wwan.ver \ src/devices/wwan/meson.build \ src/devices/wwan/tests/test-service-providers.xml \ - src/devices/wwan/tests/meson.build \ $(NULL) ############################################################################### @@ -3487,7 +3486,6 @@ endif EXTRA_DIST += \ src/devices/bluetooth/meson.build \ - src/devices/bluetooth/tests/meson.build \ $(NULL) ############################################################################### @@ -3560,7 +3558,7 @@ endif EXTRA_DIST += \ src/devices/wifi/meson.build \ - src/devices/wifi/tests/meson.build + $(NULL) ############################################################################### # src/devices/team diff --git a/src/devices/bluetooth/meson.build b/src/devices/bluetooth/meson.build index 7854d1756e..63c47bcba9 100644 --- a/src/devices/bluetooth/meson.build +++ b/src/devices/bluetooth/meson.build @@ -35,4 +35,11 @@ test( args: [libnm_device_plugin_bluetooth.full_path(), linker_script_devices], ) -subdir('tests') +test_unit = 'nm-bt-test' + +executable( + test_unit, + 'tests/' + test_unit + '.c', + dependencies: libnetwork_manager_test_dep, + c_args: test_c_flags, +) diff --git a/src/devices/bluetooth/tests/meson.build b/src/devices/bluetooth/tests/meson.build deleted file mode 100644 index 19b1955d17..0000000000 --- a/src/devices/bluetooth/tests/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -test_unit = 'nm-bt-test' - -executable( - test_unit, - test_unit + '.c', - dependencies: libnetwork_manager_test_dep, - c_args: test_c_flags, -) diff --git a/src/devices/wifi/meson.build b/src/devices/wifi/meson.build index f1c4af9625..6566f20119 100644 --- a/src/devices/wifi/meson.build +++ b/src/devices/wifi/meson.build @@ -39,5 +39,19 @@ test( ) if enable_tests - subdir('tests') + test_unit = 'test-devices-wifi' + + exe = executable( + test_unit, + ['tests/' + test_unit + '.c'] + common_sources, + dependencies: libnetwork_manager_test_dep, + c_args: test_c_flags, + ) + + test( + test_unit, + test_script, + args: test_args + [exe.full_path()], + timeout: default_test_timeout, + ) endif diff --git a/src/devices/wifi/tests/meson.build b/src/devices/wifi/tests/meson.build deleted file mode 100644 index e705e1307e..0000000000 --- a/src/devices/wifi/tests/meson.build +++ /dev/null @@ -1,15 +0,0 @@ -test_unit = 'test-devices-wifi' - -exe = executable( - test_unit, - [test_unit + '.c'] + common_sources, - dependencies: libnetwork_manager_test_dep, - c_args: test_c_flags, -) - -test( - test_unit, - test_script, - args: test_args + [exe.full_path()], - timeout: default_test_timeout, -) diff --git a/src/devices/wwan/meson.build b/src/devices/wwan/meson.build index 7f0ca27f04..ed6f801058 100644 --- a/src/devices/wwan/meson.build +++ b/src/devices/wwan/meson.build @@ -71,5 +71,20 @@ run_target( ) if enable_tests - subdir('tests') + test_unit = 'test-service-providers' + + exe = executable( + test_unit, + ['tests/' + test_unit + '.c'] + nm_service_providers_source, + include_directories: wwan_inc, + dependencies: libnetwork_manager_test_dep, + c_args: test_c_flags, + ) + + test( + 'wwan/' + test_unit, + test_script, + timeout: default_test_timeout, + args: test_args + [exe.full_path()], + ) endif diff --git a/src/devices/wwan/tests/meson.build b/src/devices/wwan/tests/meson.build deleted file mode 100644 index e165c5482b..0000000000 --- a/src/devices/wwan/tests/meson.build +++ /dev/null @@ -1,16 +0,0 @@ -test_unit = 'test-service-providers' - -exe = executable( - 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_unit, - test_script, - timeout: default_test_timeout, - args: test_args + [exe.full_path()], -)