Skip to content

Commit 64ea1b8

Browse files
cvinayakkartben
authored andcommitted
tests: bsim: Bluetooth: broadcast_audio_source interleaved/sequential
Test broadcast audio source sample in interleaved and sequential packing. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
1 parent 872b193 commit 64ea1b8

File tree

5 files changed

+43
-7
lines changed

5 files changed

+43
-7
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_ISO_PACKING_INTERLEAVED=y
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_ISO_PACKING_INTERLEAVED=n

tests/bsim/bluetooth/audio_samples/bap_broadcast_sink/compile.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,20 @@ set -ue
1010
source ${ZEPHYR_BASE}/tests/bsim/compile.source
1111

1212
if [ "${BOARD_TS}" == "nrf5340bsim_nrf5340_cpuapp" ]; then
13-
app=samples/bluetooth/bap_broadcast_source sysbuild=1 compile
13+
app=samples/bluetooth/bap_broadcast_source conf_overlay=overlay-sequential.conf \
14+
sysbuild=1 compile
15+
app=samples/bluetooth/bap_broadcast_source conf_overlay=overlay-interleaved.conf \
16+
sysbuild=1 compile
1417
app=tests/bsim/bluetooth/audio_samples/bap_broadcast_sink sysbuild=1 \
1518
conf_file=${ZEPHYR_BASE}/samples/bluetooth/bap_broadcast_sink/prj.conf \
1619
exe_name=bs_${BOARD_TS}_${app}_prj_conf sysbuild=1 compile
1720
else
18-
app=samples/bluetooth/bap_broadcast_source conf_overlay=overlay-bt_ll_sw_split.conf \
19-
exe_name=bs_${BOARD_TS}_${app}_prj_conf sysbuild=1 compile
21+
app=samples/bluetooth/bap_broadcast_source \
22+
conf_overlay='overlay-bt_ll_sw_split.conf;overlay-sequential.conf' \
23+
exe_name=bs_${BOARD_TS}_${app}_prj_conf_overlay-sequential_conf sysbuild=1 compile
24+
app=samples/bluetooth/bap_broadcast_source \
25+
conf_overlay='overlay-bt_ll_sw_split.conf;overlay-interleaved.conf' \
26+
exe_name=bs_${BOARD_TS}_${app}_prj_conf_overlay-interleaved_conf sysbuild=1 compile
2027
app=tests/bsim/bluetooth/audio_samples/bap_broadcast_sink \
2128
conf_file=${ZEPHYR_BASE}/samples/bluetooth/bap_broadcast_sink/prj.conf \
2229
conf_overlay=${ZEPHYR_BASE}/samples/bluetooth/bap_broadcast_sink/overlay-bt_ll_sw_split.conf \
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env bash
2+
# Copyright 2023 Nordic Semiconductor ASA
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# Simple selfchecking test for the broadcast audio sink/source samples,
6+
# It relies on the bs_tests hooks to register a test timer callback, which after a deadline
7+
# will check how many audio packets the broadcast audio sink has received, and if over a threshold
8+
# it considers the test passed
9+
10+
simulation_id="samples_bluetooth_bap_broadcast_source_interleaved_test"
11+
verbosity_level=2
12+
EXECUTE_TIMEOUT=200
13+
14+
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
15+
16+
cd ${BSIM_OUT_PATH}/bin
17+
18+
Execute ./bs_${BOARD_TS}_samples_bluetooth_bap_broadcast_source_prj_conf_overlay-interleaved_conf \
19+
-v=${verbosity_level} -s=${simulation_id} -d=0 -RealEncryption=1
20+
21+
Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_audio_samples_bap_broadcast_sink_prj_conf \
22+
-v=${verbosity_level} -s=${simulation_id} -d=1 -RealEncryption=1 \
23+
-testid=bap_broadcast_sink
24+
25+
Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \
26+
-D=2 -sim_length=120e6 $@
27+
28+
wait_for_background_jobs #Wait for all programs in background and return != 0 if any fails

tests/bsim/bluetooth/audio_samples/bap_broadcast_sink/tests_scripts/broadcast_audio.sh renamed to tests/bsim/bluetooth/audio_samples/bap_broadcast_sink/tests_scripts/broadcast_audio_sequential.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@
77
# will check how many audio packets the broadcast audio sink has received, and if over a threshold
88
# it considers the test passed
99

10-
simulation_id="broadcast_audio_samples_test"
10+
simulation_id="samples_bluetooth_bap_broadcast_source_sequential_test"
1111
verbosity_level=2
12+
EXECUTE_TIMEOUT=200
1213

1314
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
1415

15-
EXECUTE_TIMEOUT=200
16-
1716
cd ${BSIM_OUT_PATH}/bin
1817

19-
Execute ./bs_${BOARD_TS}_samples_bluetooth_bap_broadcast_source_prj_conf \
18+
Execute ./bs_${BOARD_TS}_samples_bluetooth_bap_broadcast_source_prj_conf_overlay-sequential_conf \
2019
-v=${verbosity_level} -s=${simulation_id} -d=0 -RealEncryption=1
2120

2221
Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_audio_samples_bap_broadcast_sink_prj_conf \

0 commit comments

Comments
 (0)