tests/bsim conn_stress/scripts/_conn_stress.sh: Fix

This custom test script had rotten and was not working.
Let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
Alberto Escolar Piedras 2024-12-02 13:22:18 +01:00 committed by Benjamin Cabé
commit 77fd5f4ecc

View file

@ -2,6 +2,8 @@
# Copyright (c) 2023 Nordic Semiconductor
# SPDX-License-Identifier: Apache-2.0
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
simulation_id="conn_stress"
process_ids=""; exit_code=0
@ -20,28 +22,23 @@ function Execute(){
echo "Running $@"
}
: "${BSIM_OUT_PATH:?BSIM_OUT_PATH must be defined}"
#Give a default value to BOARD if it does not have one yet:
BOARD="${BOARD:-nrf52_bsim}"
test_path="bsim_bluetooth_host_misc_conn_stress"
bsim_central_exe_name="bs_nrf52_${test_path}_central_prj_conf"
bsim_peripheral_exe_name="bs_nrf52_${test_path}_peripheral_prj_conf"
# terminate running simulations (if any)
${BSIM_COMPONENTS_PATH}/common/stop_bsim.sh
${BSIM_COMPONENTS_PATH}/common/stop_bsim.sh $simulation_id
# (re)Build the central & peripheral images. Don't continue if build fails.
west build -b ${BOARD} -d build_central central && \
cp build_central/zephyr/zephyr.exe \
"${BSIM_OUT_PATH}/bin/${bsim_central_exe_name}" \
|| exit
|| exit 1
west build -b ${BOARD} -d build_peripheral peripheral && \
cp build_peripheral/zephyr/zephyr.exe \
"${BSIM_OUT_PATH}/bin/${bsim_peripheral_exe_name}" \
|| exit
|| exit 1
cd ${BSIM_OUT_PATH}/bin