Skip to content

tests: Bluetooth: Split CAP and GMAP AC tests into separate scripts #89352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions tests/bsim/bluetooth/audio/test_scripts/_cap_broadcast.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env bash
#
# Copyright (c) 2025 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")
Expand Down
2 changes: 0 additions & 2 deletions tests/bsim/bluetooth/audio/test_scripts/_cap_unicast.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env bash
#
# Copyright (c) 2025 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")
Expand Down
22 changes: 0 additions & 22 deletions tests/bsim/bluetooth/audio/test_scripts/_gmap.sh

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

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

VERBOSITY_LEVEL=2
EXECUTE_TIMEOUT=60
BSIM_EXE=./bs_${BOARD_TS}_tests_bsim_bluetooth_audio_prj_conf

cd ${BSIM_OUT_PATH}/bin

function Execute_ac() {
if [[ -n $ac_tx_preset ]]; then
ac_tx_preset_arg="${ac_tx_preset_arg_name} ${ac_tx_preset}"
else
ac_tx_preset_arg=""
fi

if [[ -n $ac_rx_preset ]]; then
ac_rx_preset_arg="source_preset ${ac_rx_preset}"
else
ac_rx_preset_arg=""
fi


sim_id="${ac_profile}_ac_${ac_config}_${ac_tx_preset}_${ac_rx_preset}"

printf "\n\n======== Running %s AC_%s with %s %s =========\n\n" \
"${ac_profile}" "${ac_config}" "${ac_tx_preset_arg}" "${ac_rx_preset_arg}"

let ac_device_count=1+${ac_acc_cnt}
ac_ini_name=${ac_ini_name}_${ac_config}

Execute ${BSIM_EXE} -v=${VERBOSITY_LEVEL} -s=${sim_id} -d=0 -testid=${ac_ini_name} \
-RealEncryption=1 -rs=23 -D=${ac_device_count} \
-argstest ${ac_tx_preset_arg} ${ac_rx_preset_arg}

for i in $(seq 1 $ac_acc_cnt); do
let rs=${i}*7 # ensure unique random seed value per acceptor

Execute ${BSIM_EXE} -v=${VERBOSITY_LEVEL} -s=${sim_id} -d=${i} -testid=${ac_acc_name} \
-RealEncryption=1 -rs=${rs} -D=${ac_device_count}
done

Execute ./bs_2G4_phy_v1 -v=${VERBOSITY_LEVEL} -s=${sim_id} -D=${ac_device_count} \
-sim_length=60e6 $@

wait_for_background_jobs
}

function Execute_cap_unicast_ac() {
ac_profile="CAP" ac_ini_name=cap_initiator_ac ac_acc_name=cap_acceptor_unicast \
ac_tx_preset_arg_name=sink_preset Execute_ac $@
}

function Execute_cap_broadcast_ac() {
ac_profile="CAP" ac_ini_name=cap_initiator_ac ac_acc_name=cap_acceptor_broadcast \
ac_tx_preset_arg_name=preset Execute_ac $@
}

function Execute_gmap_unicast_ac() {
ac_profile="GMAP" ac_ini_name=gmap_ugg_ac ac_acc_name=gmap_ugt \
ac_tx_preset_arg_name=sink_preset Execute_ac $@
}

function Execute_gmap_broadcast_ac() {
ac_profile="GMAP" ac_ini_name=gmap_ugg_ac ac_acc_name=cap_acceptor_broadcast \
ac_tx_preset_arg_name=broadcast_preset Execute_ac $@
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/cap_ac_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/cap_ac_1_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/cap_ac_10_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/cap_ac_11_i_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/cap_ac_11_ii_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/cap_ac_12_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/cap_ac_13_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/cap_ac_14_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/cap_ac_2_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/cap_ac_3_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/cap_ac_4_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/cap_ac_5_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/cap_ac_6_i_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/cap_ac_6_ii_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/cap_ac_7_i_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/cap_ac_7_ii_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

set -e # Exit on error

SEARCH_PATH="${dir_path}"/cap_ac_8_i_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/cap_ac_8_ii_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/cap_ac_9_ii_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/cap_ac_9_i_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/gmap_ac_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/gmap_ac_1_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/gmap_ac_11_i_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/gmap_ac_11_ii_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/gmap_ac_12_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/gmap_ac_13_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/gmap_ac_14_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/gmap_ac_2_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/gmap_ac_3_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/gmap_ac_4_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/gmap_ac_5_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/gmap_ac_6_i_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/gmap_ac_6_ii_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/gmap_ac_7_ii_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/gmap_ac_8_i_*.sh tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

dir_path=$(dirname "$0")

SEARCH_PATH="${dir_path}"/gmap_ac_8_ii_*.sh tests/bsim/run_parallel.sh
Loading
Loading