diff --git a/samples/bluetooth/bap_broadcast_source/overlay-interleaved.conf b/samples/bluetooth/bap_broadcast_source/overlay-interleaved.conf new file mode 100644 index 000000000000000..837004a344dd814 --- /dev/null +++ b/samples/bluetooth/bap_broadcast_source/overlay-interleaved.conf @@ -0,0 +1 @@ +CONFIG_BT_ISO_PACKING_INTERLEAVED=y diff --git a/samples/bluetooth/bap_broadcast_source/overlay-sequential.conf b/samples/bluetooth/bap_broadcast_source/overlay-sequential.conf new file mode 100644 index 000000000000000..5a59893eaf7795c --- /dev/null +++ b/samples/bluetooth/bap_broadcast_source/overlay-sequential.conf @@ -0,0 +1 @@ +CONFIG_BT_ISO_PACKING_INTERLEAVED=n diff --git a/tests/bsim/bluetooth/audio_samples/bap_broadcast_sink/tests_scripts/broadcast_audio_interleaved.sh b/tests/bsim/bluetooth/audio_samples/bap_broadcast_sink/tests_scripts/broadcast_audio_interleaved.sh new file mode 100755 index 000000000000000..0ede3944b7a373e --- /dev/null +++ b/tests/bsim/bluetooth/audio_samples/bap_broadcast_sink/tests_scripts/broadcast_audio_interleaved.sh @@ -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 diff --git a/tests/bsim/bluetooth/audio_samples/bap_broadcast_sink/tests_scripts/broadcast_audio.sh b/tests/bsim/bluetooth/audio_samples/bap_broadcast_sink/tests_scripts/broadcast_audio_sequential.sh similarity index 90% rename from tests/bsim/bluetooth/audio_samples/bap_broadcast_sink/tests_scripts/broadcast_audio.sh rename to tests/bsim/bluetooth/audio_samples/bap_broadcast_sink/tests_scripts/broadcast_audio_sequential.sh index bb7230ca53efc06..91b0889817fa905 100755 --- a/tests/bsim/bluetooth/audio_samples/bap_broadcast_sink/tests_scripts/broadcast_audio.sh +++ b/tests/bsim/bluetooth/audio_samples/bap_broadcast_sink/tests_scripts/broadcast_audio_sequential.sh @@ -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 \ diff --git a/tests/bsim/bluetooth/audio_samples/compile.sh b/tests/bsim/bluetooth/audio_samples/compile.sh index d2d945df52a451e..b37c56f1867eb83 100755 --- a/tests/bsim/bluetooth/audio_samples/compile.sh +++ b/tests/bsim/bluetooth/audio_samples/compile.sh @@ -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 \ @@ -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 \