Bluetooth: tests: host: Update CMakeLists files
Update CMakeLists files to include new required files and new paths.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
diff --git a/tests/bluetooth/host/keys/bt_keys_add_type/CMakeLists.txt b/tests/bluetooth/host/keys/bt_keys_add_type/CMakeLists.txt
index 090c801..00f2a6f 100644
--- a/tests/bluetooth/host/keys/bt_keys_add_type/CMakeLists.txt
+++ b/tests/bluetooth/host/keys/bt_keys_add_type/CMakeLists.txt
@@ -2,15 +2,20 @@
cmake_minimum_required(VERSION 3.20.0)
-set(SOURCES
- src/main.c
- src/test_suite_add_type_invalid_inputs.c
-)
-
project(bt_keys_add_type)
find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE})
add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/host host_mocks)
-add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/host/keys mocks)
+add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/host/keys/mocks mocks)
target_link_libraries(testbinary PRIVATE mocks host_mocks)
+
+target_sources(testbinary
+ PRIVATE
+ src/main.c
+ src/test_suite_add_type_invalid_inputs.c
+
+ # Unit under test
+ $ENV{ZEPHYR_BASE}/subsys/bluetooth/host/keys.c
+ $ENV{ZEPHYR_BASE}/subsys/bluetooth/common/addr.c
+)
diff --git a/tests/bluetooth/host/keys/bt_keys_find/CMakeLists.txt b/tests/bluetooth/host/keys/bt_keys_find/CMakeLists.txt
index d9b133b..66a72e1 100644
--- a/tests/bluetooth/host/keys/bt_keys_find/CMakeLists.txt
+++ b/tests/bluetooth/host/keys/bt_keys_find/CMakeLists.txt
@@ -2,15 +2,20 @@
cmake_minimum_required(VERSION 3.20.0)
-set(SOURCES
- src/main.c
- src/test_suite_find_invalid_inputs.c
-)
-
project(bt_keys_find)
find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE})
add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/host host_mocks)
-add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/host/keys mocks)
+add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/host/keys/mocks mocks)
target_link_libraries(testbinary PRIVATE mocks host_mocks)
+
+target_sources(testbinary
+ PRIVATE
+ src/main.c
+ src/test_suite_find_invalid_inputs.c
+
+ # Unit under test
+ $ENV{ZEPHYR_BASE}/subsys/bluetooth/host/keys.c
+ $ENV{ZEPHYR_BASE}/subsys/bluetooth/common/addr.c
+)
diff --git a/tests/bluetooth/host/keys/bt_keys_find_irk/CMakeLists.txt b/tests/bluetooth/host/keys/bt_keys_find_irk/CMakeLists.txt
index db6bfc7..bfdc9c7 100644
--- a/tests/bluetooth/host/keys/bt_keys_find_irk/CMakeLists.txt
+++ b/tests/bluetooth/host/keys/bt_keys_find_irk/CMakeLists.txt
@@ -2,15 +2,20 @@
cmake_minimum_required(VERSION 3.20.0)
-set(SOURCES
- src/main.c
- src/test_suite_find_irk_invalid_inputs.c
-)
-
project(bt_keys_find_irk)
find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE})
add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/host host_mocks)
-add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/host/keys mocks)
+add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/host/keys/mocks mocks)
target_link_libraries(testbinary PRIVATE mocks host_mocks)
+
+target_sources(testbinary
+ PRIVATE
+ src/main.c
+ src/test_suite_find_irk_invalid_inputs.c
+
+ # Unit under test
+ $ENV{ZEPHYR_BASE}/subsys/bluetooth/host/keys.c
+ $ENV{ZEPHYR_BASE}/subsys/bluetooth/common/addr.c
+)
diff --git a/tests/bluetooth/host/keys/bt_keys_get_type/CMakeLists.txt b/tests/bluetooth/host/keys/bt_keys_get_type/CMakeLists.txt
index 12a76bd..1335870 100644
--- a/tests/bluetooth/host/keys/bt_keys_get_type/CMakeLists.txt
+++ b/tests/bluetooth/host/keys/bt_keys_get_type/CMakeLists.txt
@@ -2,15 +2,22 @@
cmake_minimum_required(VERSION 3.20.0)
-set(SOURCES
- src/main.c
- src/test_suite_get_type_invalid_inputs.c
-)
-
project(bt_keys_get_type)
find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE})
add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/host host_mocks)
-add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/host/keys mocks)
+add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/host/keys/mocks mocks)
target_link_libraries(testbinary PRIVATE mocks host_mocks)
+
+target_sources(testbinary
+ PRIVATE
+ src/main.c
+ src/test_suite_get_type_invalid_inputs.c
+ $ENV{ZEPHYR_BASE}/subsys/bluetooth/common/bt_str.c
+ $ENV{ZEPHYR_BASE}/subsys/bluetooth/host/uuid.c
+
+ # Unit under test
+ $ENV{ZEPHYR_BASE}/subsys/bluetooth/host/keys.c
+ $ENV{ZEPHYR_BASE}/subsys/bluetooth/common/addr.c
+)