Skip to content

Commit

Permalink
tests: bsim: Bluetooth: broadcast_audio_source interleaved/sequential
Browse files Browse the repository at this point in the history
Test broadcast audio source sample in interleaved and
sequential packing.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
  • Loading branch information
cvinayak committed Sep 11, 2024
1 parent 76c7bd8 commit d1011b7
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_BT_ISO_PACKING_INTERLEAVED=y
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_BT_ISO_PACKING_INTERLEAVED=n
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# Copyright 2023 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

# Simple selfchecking test for the broadcast audio sink/source samples,
# It relies on the bs_tests hooks to register a test timer callback, which after a deadline
# will check how many audio packets the broadcast audio sink has received, and if over a threshold
# it considers the test passed

simulation_id="samples_bluetooth_bap_broadcast_source_interleaved_test"
sample_long_name="samples_bluetooth_bap_broadcast_source"
verbosity_level=2
EXECUTE_TIMEOUT=200

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

cd ${BSIM_OUT_PATH}/bin

Execute ./bs_${BOARD_TS}_${sample_long_name}_prj_conf_overlay-interleaved_conf \
-v=${verbosity_level} -s=${simulation_id} -d=0 -RealEncryption=1

Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_audio_samples_bap_broadcast_sink_prj_conf \
-v=${verbosity_level} -s=${simulation_id} -d=1 -RealEncryption=1 \
-testid=bap_broadcast_sink

Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \
-D=2 -sim_length=120e6 $@

wait_for_background_jobs #Wait for all programs in background and return != 0 if any fails
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@
# will check how many audio packets the broadcast audio sink has received, and if over a threshold
# it considers the test passed

simulation_id="broadcast_audio_samples_test"
simulation_id="samples_bluetooth_bap_broadcast_source_sequential_test"
verbosity_level=2
EXECUTE_TIMEOUT=200

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

EXECUTE_TIMEOUT=200

cd ${BSIM_OUT_PATH}/bin

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

Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_audio_samples_bap_broadcast_sink_prj_conf \
Expand Down
13 changes: 10 additions & 3 deletions tests/bsim/bluetooth/audio_samples/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ source ${ZEPHYR_BASE}/tests/bsim/compile.source

if [ "${BOARD_TS}" == "nrf5340bsim_nrf5340_cpuapp" ]; then
app=samples/bluetooth/bap_unicast_server sysbuild=1 compile
app=samples/bluetooth/bap_broadcast_source sysbuild=1 compile
app=samples/bluetooth/bap_broadcast_source conf_overlay=overlay-sequential.conf \
sysbuild=1 compile
app=samples/bluetooth/bap_broadcast_source conf_overlay=overlay-interleaved.conf \
sysbuild=1 compile
app=tests/bsim/bluetooth/audio_samples/bap_unicast_client \
sample=${ZEPHYR_BASE}/samples/bluetooth/bap_unicast_client \
conf_file=${sample}/prj.conf \
Expand Down Expand Up @@ -41,8 +44,12 @@ if [ "${BOARD_TS}" == "nrf5340bsim_nrf5340_cpuapp" ]; then
else
app=samples/bluetooth/bap_unicast_server conf_overlay=overlay-bt_ll_sw_split.conf \
exe_name=bs_${BOARD_TS}_${app}_prj_conf sysbuild=1 compile
app=samples/bluetooth/bap_broadcast_source conf_overlay=overlay-bt_ll_sw_split.conf \
exe_name=bs_${BOARD_TS}_${app}_prj_conf sysbuild=1 compile
app=samples/bluetooth/bap_broadcast_source \
conf_overlay='overlay-bt_ll_sw_split.conf;overlay-sequential.conf' \
exe_name=bs_${BOARD_TS}_${app}_prj_conf_overlay-sequential_conf sysbuild=1 compile
app=samples/bluetooth/bap_broadcast_source \
conf_overlay='overlay-bt_ll_sw_split.conf;overlay-interleaved.conf' \
exe_name=bs_${BOARD_TS}_${app}_prj_conf_overlay-interleaved_conf sysbuild=1 compile
app=tests/bsim/bluetooth/audio_samples/bap_unicast_client \
sample=${ZEPHYR_BASE}/samples/bluetooth/bap_unicast_client \
conf_file=${sample}/prj.conf \
Expand Down

0 comments on commit d1011b7

Please sign in to comment.