diff --git a/tests/bluetooth/audio/ccp_call_control_client/CMakeLists.txt b/tests/bluetooth/audio/ccp_call_control_client/CMakeLists.txt index 2cee4defb0df4..34a327d71a7c8 100644 --- a/tests/bluetooth/audio/ccp_call_control_client/CMakeLists.txt +++ b/tests/bluetooth/audio/ccp_call_control_client/CMakeLists.txt @@ -2,18 +2,30 @@ cmake_minimum_required(VERSION 3.20.0) -project(bluetooth_ccp) -find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) +project(bluetooth_ccp_client) -add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/audio/ccp_call_control_client/uut uut) +target_include_directories(app PRIVATE + ${ZEPHYR_BASE}/subsys/bluetooth/ -target_link_libraries(testbinary PRIVATE uut) + ${ZEPHYR_BASE}/tests/bluetooth/audio/ccp_call_control_client/include + ${ZEPHYR_BASE}/tests/bluetooth/audio/mocks/include +) + +target_sources(app PRIVATE + # Test source files + src/main.c + src/test_common.c + src/test_procedures.c + + # UUT files + uut/ccp_call_control_client.c + uut/tbs_client.c -target_include_directories(testbinary PRIVATE include) + # Stack source file + ${ZEPHYR_BASE}/subsys/bluetooth/audio/ccp_call_control_client.c -target_sources(testbinary - PRIVATE - src/main.c - src/test_common.c - src/test_procedures.c + # Mock files + ${ZEPHYR_BASE}/tests/bluetooth/audio/mocks/src/conn.c + ${ZEPHYR_BASE}/tests/bluetooth/audio/mocks/src/gatt.c ) diff --git a/tests/bluetooth/audio/ccp_call_control_client/Kconfig b/tests/bluetooth/audio/ccp_call_control_client/Kconfig new file mode 100644 index 0000000000000..2223bc0a8ebf1 --- /dev/null +++ b/tests/bluetooth/audio/ccp_call_control_client/Kconfig @@ -0,0 +1,67 @@ +# Copyright (c) 2025 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +config BT_AUDIO + bool + default y + +config BT_BONDABLE + bool + default y + +config BT_BUF_ACL_RX_SIZE + int + default 69 + +config BT_BUF_ACL_TX_COUNT + int + default 5 + +config BT_BUF_EVT_RX_COUNT + int + default 10 + +config BT_CONN + bool + default y + +config BT_EXT_ADV + bool + default y + +config BT_L2CAP_TX_MTU + int + default 65 + +config BT_LOG + bool + default y + +config BT_MAX_CONN + int + default 1 + +config BT_MAX_PAIRED + int + default 1 + +config BT_SMP + bool + default y + +config BT_TBS_CLIENT + bool + default y + +config BT_TBS_CLIENT_GTBS + bool + default y + +config BT_TBS_CLIENT_TBS + bool + default y + +# Include Zephyr's Kconfig. +source "Kconfig" +source "subsys/bluetooth/audio/Kconfig" +source "subsys/bluetooth/Kconfig.logging" diff --git a/tests/bluetooth/audio/ccp_call_control_client/prj.conf b/tests/bluetooth/audio/ccp_call_control_client/prj.conf index 5f0f8a3f2a9f7..8701deece40de 100644 --- a/tests/bluetooth/audio/ccp_call_control_client/prj.conf +++ b/tests/bluetooth/audio/ccp_call_control_client/prj.conf @@ -1,16 +1,7 @@ CONFIG_ZTEST=y -CONFIG_BT=y -CONFIG_BT_EXT_ADV=y -CONFIG_BT_SMP=y -CONFIG_BT_PERIPHERAL=y -CONFIG_BT_GATT_CLIENT=y -CONFIG_BT_GATT_AUTO_DISCOVER_CCC=y -CONFIG_BT_AUDIO=y CONFIG_BT_CCP_CALL_CONTROL_CLIENT=y CONFIG_BT_CCP_CALL_CONTROL_CLIENT_BEARER_COUNT=2 -CONFIG_BT_TBS_CLIENT_TBS=y -CONFIG_BT_TBS_CLIENT_GTBS=y CONFIG_UTF8=y CONFIG_ASSERT=y diff --git a/tests/bluetooth/audio/ccp_call_control_client/testcase.yaml b/tests/bluetooth/audio/ccp_call_control_client/testcase.yaml index 007a4f45ef577..4f5a64225637d 100644 --- a/tests/bluetooth/audio/ccp_call_control_client/testcase.yaml +++ b/tests/bluetooth/audio/ccp_call_control_client/testcase.yaml @@ -4,4 +4,7 @@ common: - bluetooth_audio tests: bluetooth.audio.ccp_call_control_client.test: - type: unit + platform_allow: + - native_sim + integration_platforms: + - native_sim diff --git a/tests/bluetooth/audio/ccp_call_control_client/uut/CMakeLists.txt b/tests/bluetooth/audio/ccp_call_control_client/uut/CMakeLists.txt deleted file mode 100644 index 1347cc8e0f195..0000000000000 --- a/tests/bluetooth/audio/ccp_call_control_client/uut/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -# -# Copyright (c) 2024 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: Apache-2.0 -# -# CMakeLists.txt file for creating of uut library. -# - -add_library(uut STATIC - ${ZEPHYR_BASE}/lib/net_buf/buf_simple.c - ${ZEPHYR_BASE}/subsys/bluetooth/audio/ccp_call_control_client.c - ${ZEPHYR_BASE}/subsys/logging/log_minimal.c - ccp_call_control_client.c - tbs_client.c -) - -add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/audio/mocks mocks) - -target_link_libraries(uut PUBLIC test_interface mocks) -target_include_directories(uut PRIVATE ${ZEPHYR_BASE}/tests/bluetooth/audio/ccp_call_control_client/include) - -target_compile_options(uut PRIVATE -std=c11 -include ztest.h)