Skip to content

Commit af00bc5

Browse files
Thalleykartben
authored andcommitted
tests: Bluetooth: Codec: Modify unittests to native_sim
Modify the unit tests to use the native_sim board instead of the unit_testing board. The native_sim board allows us to use the kernel in a more regular way, while still being able to treat the tests as unittest. Signed-off-by: Emil Gydesen <[email protected]>
1 parent 1384818 commit af00bc5

File tree

5 files changed

+9
-34
lines changed

5 files changed

+9
-34
lines changed

tests/bluetooth/audio/codec/CMakeLists.txt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,10 @@
22

33
cmake_minimum_required(VERSION 3.20.0)
44

5-
find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE})
6-
5+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
76
project(bluetooth_codec)
87

9-
add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/audio/codec/uut uut)
10-
11-
target_link_libraries(testbinary PRIVATE uut)
12-
13-
target_include_directories(testbinary PRIVATE include)
14-
15-
target_sources(testbinary
8+
target_sources(app
169
PRIVATE
1710
src/main.c
1811
)

tests/bluetooth/audio/codec/prj.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ CONFIG_BT_PERIPHERAL=y
66
CONFIG_BT_ISO_PERIPHERAL=y
77
CONFIG_BT_AUDIO=y
88
CONFIG_BT_GATT_DYNAMIC_DB=y
9+
CONFIG_BT_ATT_PREPARE_COUNT=1
910
CONFIG_BT_BAP_UNICAST_SERVER=y
1011
CONFIG_BT_ASCS=y
1112

tests/bluetooth/audio/codec/src/main.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919
#include <zephyr/fff.h>
2020
#include <zephyr/sys/byteorder.h>
2121
#include <zephyr/sys/util.h>
22-
23-
#include <ztest_test.h>
24-
#include <ztest_assert.h>
22+
#include <zephyr/ztest_test.h>
23+
#include <zephyr/ztest_assert.h>
2524

2625
DEFINE_FFF_GLOBALS;
2726

tests/bluetooth/audio/codec/testcase.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ common:
44
- bluetooth_audio
55
tests:
66
bluetooth.audio.codec.test:
7-
type: unit
7+
platform_allow:
8+
- native_sim
9+
integration_platforms:
10+
- native_sim

tests/bluetooth/audio/codec/uut/CMakeLists.txt

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)