Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 20 additions & 8 deletions tests/bluetooth/audio/ccp_call_control_server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,28 @@

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_server)

add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/audio/ccp_call_control_server/uut uut)
target_include_directories(app PRIVATE
${ZEPHYR_BASE}/subsys/bluetooth/

target_link_libraries(testbinary PRIVATE uut)
${ZEPHYR_BASE}/tests/bluetooth/audio/mocks/include
)

target_sources(app PRIVATE
# Test source files
src/main.c

target_include_directories(testbinary PRIVATE include)
# Stack source file
${ZEPHYR_BASE}/subsys/bluetooth/audio/audio.c
${ZEPHYR_BASE}/subsys/bluetooth/audio/ccid.c
${ZEPHYR_BASE}/subsys/bluetooth/audio/ccp_call_control_server.c
${ZEPHYR_BASE}/subsys/bluetooth/audio/tbs.c
${ZEPHYR_BASE}/subsys/bluetooth/common/bt_str.c
${ZEPHYR_BASE}/subsys/bluetooth/host/uuid.c

target_sources(testbinary
PRIVATE
src/main.c
# Mock files
${ZEPHYR_BASE}/tests/bluetooth/audio/mocks/src/conn.c
${ZEPHYR_BASE}/tests/bluetooth/audio/mocks/src/gatt.c
)
63 changes: 63 additions & 0 deletions tests/bluetooth/audio/ccp_call_control_server/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# 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
bool
default y

config BT_TBS_BEARER_COUNT
int
default 1

# Include Zephyr's Kconfig.
source "Kconfig"
source "subsys/bluetooth/audio/Kconfig"
source "subsys/bluetooth/Kconfig.logging"
18 changes: 9 additions & 9 deletions tests/bluetooth/audio/ccp_call_control_server/prj.conf
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
CONFIG_ZTEST=y

CONFIG_BT=y
CONFIG_BT_SMP=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_EXT_ADV=y
CONFIG_BT_GATT_DYNAMIC_DB=y
CONFIG_BT_AUDIO=y
CONFIG_NET_BUF=y
#CONFIG_BT=y
#CONFIG_BT_SMP=y
#CONFIG_BT_PERIPHERAL=y
#CONFIG_BT_EXT_ADV=y
#CONFIG_BT_GATT_DYNAMIC_DB=y
#CONFIG_BT_AUDIO=y
CONFIG_BT_CCP_CALL_CONTROL_SERVER=y
CONFIG_BT_CCP_CALL_CONTROL_SERVER_BEARER_COUNT=2
CONFIG_BT_TBS=y
CONFIG_BT_TBS_BEARER_COUNT=1
#CONFIG_BT_TBS=y
#CONFIG_BT_TBS_BEARER_COUNT=1
CONFIG_UTF8=y

CONFIG_ASSERT=y
Expand All @@ -18,4 +19,3 @@ CONFIG_ASSERT_VERBOSE=y

CONFIG_LOG=y
CONFIG_BT_CCP_CALL_CONTROL_SERVER_LOG_LEVEL_DBG=y
CONFIG_BT_TBS_LOG_LEVEL_DBG=y
5 changes: 2 additions & 3 deletions tests/bluetooth/audio/ccp_call_control_server/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
#include <zephyr/fff.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/util_macro.h>

#include <ztest_test.h>
#include <ztest_assert.h>
#include <zephyr/ztest_test.h>
#include <zephyr/ztest_assert.h>

DEFINE_FFF_GLOBALS;

Expand Down
5 changes: 4 additions & 1 deletion tests/bluetooth/audio/ccp_call_control_server/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ common:
- bluetooth_audio
tests:
bluetooth.audio.ccp_call_control_server.test:
type: unit
platform_allow:
- native_sim
integration_platforms:
- native_sim
22 changes: 0 additions & 22 deletions tests/bluetooth/audio/ccp_call_control_server/uut/CMakeLists.txt

This file was deleted.