tests/bsim bt host/att: Test scripts cleanup
Use the common scripts so we have a consitent way of running the tests, report failures in the same way, can stop them with ctrl+C, properly wait for all processes to exit.. Let's also place the test scripts in the test_scripts/ folder as it is convention. Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no> (f) ests/bsim bt att: Use common s
This commit is contained in:
parent
5acc7c4815
commit
39c9a995cb
24 changed files with 158 additions and 262 deletions
|
@ -1,14 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
dotslash="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
|
||||
bin_dir="${BSIM_OUT_PATH}/bin"
|
||||
BOARD="${BOARD:-nrf52_bsim}"
|
||||
|
||||
cd "${dotslash}"
|
||||
|
||||
compile_path="${bin_dir}/bs_${BOARD}_"
|
||||
compile_path+="$(realpath --relative-to "$(west topdir)"/zephyr prj.conf | tr /. _)"
|
||||
|
||||
west build -b nrf52_bsim
|
||||
cp -v build/zephyr/zephyr.exe "${compile_path}"
|
|
@ -1,26 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
dotslash="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
|
||||
bin_dir="${BSIM_OUT_PATH}/bin"
|
||||
BOARD="${BOARD:-nrf52_bsim}"
|
||||
|
||||
cd "${dotslash}"
|
||||
|
||||
compile_path="${bin_dir}/bs_${BOARD}_"
|
||||
compile_path+="$(realpath --relative-to "$(west topdir)"/zephyr prj.conf | tr /. _)"
|
||||
|
||||
args_all=(-s=long_read -D=2)
|
||||
args_dev=(-v=2 -RealEncryption=1 -testid=the_test)
|
||||
sim_seconds=60
|
||||
|
||||
echo "Simulation time: $sim_seconds seconds"
|
||||
|
||||
# bs_2G4_phy_v1 requires pwd to at its location
|
||||
cd "${BSIM_OUT_PATH}/bin"
|
||||
|
||||
("${compile_path}" "${args_all[@]}" "${args_dev[@]}" -d=0 || echo d0 $?) &
|
||||
("${compile_path}" "${args_all[@]}" "${args_dev[@]}" -d=1 || echo d1 $?) &
|
||||
(./bs_2G4_phy_v1 "${args_all[@]}" -v=6 -sim_length=$((sim_seconds * 10 ** 6)) || echo phy $?) &
|
||||
|
||||
wait
|
16
tests/bsim/bluetooth/host/att/long_read/test_scripts/_build.sh
Executable file
16
tests/bsim/bluetooth/host/att/long_read/test_scripts/_build.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright 2023 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -eu
|
||||
|
||||
: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}"
|
||||
|
||||
WORK_DIR="${WORK_DIR:-${ZEPHYR_BASE}/bsim_out}"
|
||||
INCR_BUILD=1
|
||||
|
||||
source ${ZEPHYR_BASE}/tests/bsim/compile.source
|
||||
|
||||
app="$(guess_test_relpath)" compile
|
||||
|
||||
wait_for_background_jobs
|
22
tests/bsim/bluetooth/host/att/long_read/test_scripts/run.sh
Executable file
22
tests/bsim/bluetooth/host/att/long_read/test_scripts/run.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright 2023 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -eu
|
||||
|
||||
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
|
||||
|
||||
simulation_id="long_read"
|
||||
dev_exe=bs_${BOARD}_$(guess_test_long_name)_prj_conf
|
||||
args_all=(-s=${simulation_id} -D=2)
|
||||
args_dev=(-v=2 -RealEncryption=1 -testid=the_test)
|
||||
|
||||
cd "${BSIM_OUT_PATH}/bin"
|
||||
|
||||
Execute ./${dev_exe} "${args_all[@]}" "${args_dev[@]}" -d=0
|
||||
|
||||
Execute ./${dev_exe} "${args_all[@]}" "${args_dev[@]}" -d=1
|
||||
|
||||
Execute ./bs_2G4_phy_v1 "${args_all[@]}" -v=6 -sim_length=60e6
|
||||
|
||||
wait_for_background_jobs
|
|
@ -3,17 +3,12 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -eu
|
||||
bash_source_dir="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
|
||||
|
||||
# Read variable definitions output by _env.sh
|
||||
source "${bash_source_dir}/_env.sh"
|
||||
: "${BSIM_COMPONENTS_PATH:?BSIM_COMPONENTS_PATH must be defined}"
|
||||
: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}"
|
||||
|
||||
WORK_DIR="${WORK_DIR:-${ZEPHYR_BASE}/bsim_out}"
|
||||
BOARD="${BOARD:-nrf52_bsim}"
|
||||
BOARD_ROOT="${BOARD_ROOT:-${ZEPHYR_BASE}}"
|
||||
INCR_BUILD=1
|
||||
mkdir -p ${WORK_DIR}
|
||||
source ${ZEPHYR_BASE}/tests/bsim/compile.source
|
||||
app="tests/bsim/bluetooth/$test_name" compile
|
||||
|
||||
app="$(guess_test_relpath)" compile
|
||||
|
||||
wait_for_background_jobs
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright 2023 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
set -eu
|
||||
bash_source_dir="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
|
||||
|
||||
: "${BSIM_OUT_PATH:?BSIM_OUT_PATH must be defined}"
|
||||
|
||||
test_name="$(basename "$(realpath "$bash_source_dir/..")")"
|
||||
bsim_bin="${BSIM_OUT_PATH}/bin"
|
||||
verbosity_level=2
|
||||
BOARD="${BOARD:-nrf52_bsim}"
|
||||
simulation_id="$test_name"
|
||||
central_exe="${bsim_bin}/bs_${BOARD}_tests_bsim_bluetooth_host_att_mtu_update_prj_conf"
|
||||
peripheral_exe="${central_exe}"
|
|
@ -3,14 +3,12 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -eu
|
||||
bash_source_dir="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
|
||||
|
||||
source "${bash_source_dir}/_env.sh"
|
||||
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
|
||||
|
||||
simulation_id="$test_name"
|
||||
simulation_id="$(guess_test_long_name)"
|
||||
verbosity_level=2
|
||||
EXECUTE_TIMEOUT=30
|
||||
central_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD}_$(guess_test_long_name)_prj_conf"
|
||||
peripheral_exe="${central_exe}"
|
||||
|
||||
cd ${BSIM_OUT_PATH}/bin
|
||||
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2023 Nordic Semiconductor
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -eu
|
||||
dotslash="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
|
||||
bin_dir="${BSIM_OUT_PATH}/bin"
|
||||
BOARD="${BOARD:-nrf52_bsim}"
|
||||
|
||||
cd "${dotslash}"
|
||||
|
||||
compile_path="${bin_dir}/bs_${BOARD}_"
|
||||
compile_path+="$(realpath --relative-to "$(west topdir)"/zephyr prj.conf | tr /. _)"
|
||||
|
||||
west build -b nrf52_bsim
|
||||
cp -v build/zephyr/zephyr.exe "${compile_path}"
|
|
@ -1,36 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2023 Nordic Semiconductor
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -eu
|
||||
|
||||
dotslash="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
|
||||
bin_dir="${BSIM_OUT_PATH}/bin"
|
||||
BOARD="${BOARD:-nrf52_bsim}"
|
||||
|
||||
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
|
||||
|
||||
cd "${dotslash}"
|
||||
|
||||
compile_name="bs_${BOARD}_"
|
||||
compile_name+="$(realpath --relative-to "$(west topdir)"/zephyr prj.conf | tr /. _)"
|
||||
|
||||
compile_path="${bin_dir}/${compile_name}"
|
||||
simulation_id="${compile_name}_$(basename "${BASH_SOURCE[0]}" | tr /. _)"
|
||||
|
||||
args_all=(-s="${simulation_id}" -D=2)
|
||||
args_dev=(-v=2 -RealEncryption=1 -testid=the_test)
|
||||
sim_seconds=200
|
||||
|
||||
echo "Simulation time: $sim_seconds seconds"
|
||||
|
||||
EXECUTE_TIMEOUT=60
|
||||
|
||||
# bs_2G4_phy_v1 requires pwd to at its location
|
||||
cd "${BSIM_OUT_PATH}/bin"
|
||||
|
||||
Execute "${compile_path}" "${args_all[@]}" "${args_dev[@]}" -d=1
|
||||
Execute ./bs_2G4_phy_v1 "${args_all[@]}" -v=6 -sim_length=$((sim_seconds * 10 ** 6))
|
||||
Execute "${compile_path}" "${args_all[@]}" "${args_dev[@]}" -d=0
|
||||
|
||||
wait_for_background_jobs
|
16
tests/bsim/bluetooth/host/att/open_close/test_scripts/_build.sh
Executable file
16
tests/bsim/bluetooth/host/att/open_close/test_scripts/_build.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright 2023 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -eu
|
||||
|
||||
: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}"
|
||||
|
||||
WORK_DIR="${WORK_DIR:-${ZEPHYR_BASE}/bsim_out}"
|
||||
INCR_BUILD=1
|
||||
|
||||
source ${ZEPHYR_BASE}/tests/bsim/compile.source
|
||||
|
||||
app="$(guess_test_relpath)" compile
|
||||
|
||||
wait_for_background_jobs
|
24
tests/bsim/bluetooth/host/att/open_close/test_scripts/run.sh
Executable file
24
tests/bsim/bluetooth/host/att/open_close/test_scripts/run.sh
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2023 Nordic Semiconductor
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -eu
|
||||
|
||||
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
|
||||
|
||||
test_path=$(guess_test_long_name)
|
||||
dev_exe="bs_${BOARD}_${test_path}_prj_conf"
|
||||
simulation_id="${test_path}"
|
||||
|
||||
EXECUTE_TIMEOUT=60
|
||||
|
||||
cd "${BSIM_OUT_PATH}/bin"
|
||||
|
||||
args_all=(-s="${simulation_id}" -D=2)
|
||||
args_dev=(-v=2 -RealEncryption=1 -testid=the_test)
|
||||
|
||||
Execute ./"${dev_exe}" "${args_all[@]}" "${args_dev[@]}" -d=1
|
||||
Execute ./bs_2G4_phy_v1 "${args_all[@]}" -v=6 -sim_length=200e6
|
||||
Execute ./"${dev_exe}" "${args_all[@]}" "${args_dev[@]}" -d=0
|
||||
|
||||
wait_for_background_jobs
|
|
@ -1,20 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright 2023 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# Path checks, etc
|
||||
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
|
||||
|
||||
BOARD="${BOARD:-nrf52_bsim}"
|
||||
dut_exe="bs_${BOARD}_tests_bsim_bluetooth_host_att_pipeline_dut_prj_conf"
|
||||
tester_exe="bs_${BOARD}_tests_bsim_bluetooth_host_att_pipeline_tester_prj_conf"
|
||||
|
||||
# terminate running simulations (if any)
|
||||
${BSIM_COMPONENTS_PATH}/common/stop_bsim.sh
|
||||
|
||||
west build -b ${BOARD} -d build_a dut && \
|
||||
cp build_a/zephyr/zephyr.exe "${BSIM_OUT_PATH}/bin/${dut_exe}" &&
|
||||
|
||||
# b stands for bad
|
||||
west build -b ${BOARD} -d build_b tester && \
|
||||
cp build_b/zephyr/zephyr.exe "${BSIM_OUT_PATH}/bin/${tester_exe}"
|
15
tests/bsim/bluetooth/host/att/pipeline/test_scripts/_compile.sh
Executable file
15
tests/bsim/bluetooth/host/att/pipeline/test_scripts/_compile.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright 2023 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
set -eu
|
||||
|
||||
: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}"
|
||||
|
||||
WORK_DIR="${WORK_DIR:-${ZEPHYR_BASE}/bsim_out}"
|
||||
INCR_BUILD=1
|
||||
source ${ZEPHYR_BASE}/tests/bsim/compile.source
|
||||
|
||||
app="$(guess_test_relpath)"/dut compile
|
||||
app="$(guess_test_relpath)"/tester compile
|
||||
|
||||
wait_for_background_jobs
|
|
@ -2,16 +2,13 @@
|
|||
# Copyright 2023 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
BOARD="${BOARD:-nrf52_bsim}"
|
||||
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
|
||||
|
||||
dut_exe="bs_${BOARD}_tests_bsim_bluetooth_host_att_pipeline_dut_prj_conf"
|
||||
tester_exe="bs_${BOARD}_tests_bsim_bluetooth_host_att_pipeline_tester_prj_conf"
|
||||
|
||||
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
|
||||
|
||||
test_name="att_pipeline"
|
||||
simulation_id="${test_name}"
|
||||
simulation_id="att_pipeline"
|
||||
verbosity_level=2
|
||||
EXECUTE_TIMEOUT=30
|
||||
sim_length_us=100e6
|
||||
|
||||
cd ${BSIM_OUT_PATH}/bin
|
|
@ -1,18 +1,16 @@
|
|||
#!/bin/env bash
|
||||
#!/usr/bin/env bash
|
||||
# Copyright 2023 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -eu
|
||||
bash_source_dir="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
|
||||
: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}"
|
||||
|
||||
source "${bash_source_dir}/_env.sh"
|
||||
WORK_DIR="${WORK_DIR:-${ZEPHYR_BASE}/bsim_out}"
|
||||
INCR_BUILD=1
|
||||
|
||||
pushd client
|
||||
west build -b nrf52_bsim && \
|
||||
cp -v build/zephyr/zephyr.exe "${test_exe_d0}"
|
||||
popd
|
||||
source ${ZEPHYR_BASE}/tests/bsim/compile.source
|
||||
|
||||
pushd server
|
||||
west build -b nrf52_bsim && \
|
||||
cp -v build/zephyr/zephyr.exe "${test_exe_d1}"
|
||||
popd
|
||||
app="$(guess_test_relpath)"/client compile
|
||||
app="$(guess_test_relpath)"/server compile
|
||||
|
||||
wait_for_background_jobs
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
#!/bin/env bash
|
||||
# Copyright 2023 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -eu
|
||||
bash_source_dir="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
|
||||
|
||||
: "${BSIM_OUT_PATH:?BSIM_OUT_PATH must be defined}"
|
||||
|
||||
test_name="$(basename "$(realpath "$bash_source_dir/..")")"
|
||||
bsim_bin="${BSIM_OUT_PATH}/bin"
|
||||
verbosity_level=2
|
||||
BOARD="${BOARD:-nrf52_bsim}"
|
||||
simulation_id="$test_name"
|
||||
test_exe_d0="${bsim_bin}/bs_${BOARD}_tests_bsim_bluetooth_host_att_${test_name}_client_prj_conf"
|
||||
test_exe_d1="${bsim_bin}/bs_${BOARD}_tests_bsim_bluetooth_host_att_${test_name}_server_prj_conf"
|
|
@ -3,26 +3,13 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -eu
|
||||
bash_source_dir="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
|
||||
|
||||
# Read variable definitions output by _env.sh
|
||||
source "${bash_source_dir}/_env.sh"
|
||||
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
|
||||
|
||||
process_ids=""
|
||||
exit_code=0
|
||||
|
||||
function Execute() {
|
||||
if [ ! -f $1 ]; then
|
||||
echo -e " \e[91m$(pwd)/$(basename $1) cannot be found (did you forget to\
|
||||
compile it?)\e[39m"
|
||||
exit 1
|
||||
fi
|
||||
echo -E "$@"
|
||||
timeout 30 $@ &
|
||||
process_ids="$process_ids $!"
|
||||
}
|
||||
|
||||
: "${BSIM_OUT_PATH:?BSIM_OUT_PATH must be defined}"
|
||||
verbosity_level=2
|
||||
simulation_id="read_fill_buf"
|
||||
test_exe_d0="${BSIM_OUT_PATH}/bin/bs_${BOARD}_$(guess_test_long_name)_client_prj_conf"
|
||||
test_exe_d1="${BSIM_OUT_PATH}/bin/bs_${BOARD}_$(guess_test_long_name)_server_prj_conf"
|
||||
|
||||
cd ${BSIM_OUT_PATH}/bin
|
||||
|
||||
|
@ -37,12 +24,4 @@ Execute "$test_exe_d1" \
|
|||
Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s="${simulation_id}" \
|
||||
-D=2 -sim_length=60e6 $@
|
||||
|
||||
for process_id in $process_ids; do
|
||||
wait $process_id || let "exit_code=$?"
|
||||
done
|
||||
|
||||
if [ ${exit_code} -ne 0 ]; then
|
||||
exit_code=1
|
||||
fi
|
||||
|
||||
exit $exit_code # the last exit code != 0
|
||||
wait_for_background_jobs
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
#!/bin/env bash
|
||||
# Copyright 2023 Codecoup
|
||||
#!/usr/bin/env bash
|
||||
# Copyright 2023 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -eu
|
||||
bash_source_dir="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
|
||||
: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}"
|
||||
|
||||
source "${bash_source_dir}/_env.sh"
|
||||
WORK_DIR="${WORK_DIR:-${ZEPHYR_BASE}/bsim_out}"
|
||||
INCR_BUILD=1
|
||||
|
||||
pushd client
|
||||
west build -b nrf52_bsim && \
|
||||
cp -v build/zephyr/zephyr.exe "${test_exe_d0}"
|
||||
popd
|
||||
source ${ZEPHYR_BASE}/tests/bsim/compile.source
|
||||
|
||||
pushd server
|
||||
west build -b nrf52_bsim && \
|
||||
cp -v build/zephyr/zephyr.exe "${test_exe_d1}"
|
||||
popd
|
||||
app="$(guess_test_relpath)"/client compile
|
||||
app="$(guess_test_relpath)"/server compile
|
||||
|
||||
wait_for_background_jobs
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
#!/bin/env bash
|
||||
# Copyright 2023 Codecoup
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -eu
|
||||
bash_source_dir="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
|
||||
|
||||
: "${BSIM_OUT_PATH:?BSIM_OUT_PATH must be defined}"
|
||||
|
||||
test_name="$(basename "$(realpath "$bash_source_dir/..")")"
|
||||
bsim_bin="${BSIM_OUT_PATH}/bin"
|
||||
verbosity_level=2
|
||||
BOARD="${BOARD:-nrf52_bsim}"
|
||||
test_exe_d0="${bsim_bin}/bs_${BOARD}_tests_bsim_bluetooth_host_att_${test_name}_client_prj_conf"
|
||||
test_exe_d1="${bsim_bin}/bs_${BOARD}_tests_bsim_bluetooth_host_att_${test_name}_server_prj_conf"
|
|
@ -3,12 +3,14 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -eu
|
||||
bash_source_dir="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
|
||||
|
||||
simulation_id=$(basename "$0")
|
||||
source "${bash_source_dir}/_env.sh"
|
||||
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
|
||||
|
||||
simulation_id="retry_on_sec_err"
|
||||
verbosity_level=2
|
||||
test_exe_d0="./bs_${BOARD}_$(guess_test_long_name)_client_prj_conf"
|
||||
test_exe_d1="./bs_${BOARD}_$(guess_test_long_name)_server_prj_conf"
|
||||
|
||||
cd ${BSIM_OUT_PATH}/bin
|
||||
|
||||
printf "\n\n===== ATT retry on security error (auto security elevation) ======\n\n"
|
||||
|
|
|
@ -3,12 +3,13 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -eu
|
||||
bash_source_dir="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
|
||||
|
||||
simulation_id=$(basename "$0")
|
||||
source "${bash_source_dir}/_env.sh"
|
||||
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
|
||||
|
||||
simulation_id="retry_on_sec_err_seq_request"
|
||||
verbosity_level=2
|
||||
test_exe_d0="./bs_${BOARD}_$(guess_test_long_name)_client_prj_conf"
|
||||
test_exe_d1="./bs_${BOARD}_$(guess_test_long_name)_server_prj_conf"
|
||||
|
||||
cd ${BSIM_OUT_PATH}/bin
|
||||
|
||||
printf "\n\n==== ATT retry on security error (peripheral security request) ====\n\n"
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright 2023 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# Path checks, etc
|
||||
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
|
||||
|
||||
BOARD="${BOARD:-nrf52_bsim}"
|
||||
dut_exe="bs_${BOARD}_tests_bsim_bluetooth_host_att_sequential_dut_prj_conf"
|
||||
tester_exe="bs_${BOARD}_tests_bsim_bluetooth_host_att_sequential_tester_prj_conf"
|
||||
|
||||
# terminate running simulations (if any)
|
||||
${BSIM_COMPONENTS_PATH}/common/stop_bsim.sh
|
||||
|
||||
west build -b ${BOARD} -d build_dut dut && \
|
||||
cp build_dut/zephyr/zephyr.exe "${BSIM_OUT_PATH}/bin/${dut_exe}" &&
|
||||
west build -b ${BOARD} -d build_tester tester && \
|
||||
cp build_tester/zephyr/zephyr.exe "${BSIM_OUT_PATH}/bin/${tester_exe}"
|
15
tests/bsim/bluetooth/host/att/sequential/test_scripts/_compile.sh
Executable file
15
tests/bsim/bluetooth/host/att/sequential/test_scripts/_compile.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright 2023 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
set -eu
|
||||
|
||||
: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}"
|
||||
|
||||
WORK_DIR="${WORK_DIR:-${ZEPHYR_BASE}/bsim_out}"
|
||||
INCR_BUILD=1
|
||||
source ${ZEPHYR_BASE}/tests/bsim/compile.source
|
||||
|
||||
app="$(guess_test_relpath)"/dut compile
|
||||
app="$(guess_test_relpath)"/tester compile
|
||||
|
||||
wait_for_background_jobs
|
|
@ -2,22 +2,18 @@
|
|||
# Copyright 2023 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
BOARD="${BOARD:-nrf52_bsim}"
|
||||
dut_exe="bs_${BOARD}_tests_bsim_bluetooth_host_att_sequential_dut_prj_conf"
|
||||
tester_exe="bs_${BOARD}_tests_bsim_bluetooth_host_att_sequential_tester_prj_conf"
|
||||
|
||||
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
|
||||
|
||||
test_name="att_sequential"
|
||||
simulation_id="${test_name}"
|
||||
simulation_id="att_sequential"
|
||||
verbosity_level=2
|
||||
EXECUTE_TIMEOUT=30
|
||||
sim_length_us=10e6
|
||||
|
||||
dut_exe="bs_${BOARD}_$(guess_test_long_name)_dut_prj_conf"
|
||||
tester_exe="bs_${BOARD}_$(guess_test_long_name)_tester_prj_conf"
|
||||
|
||||
cd ${BSIM_OUT_PATH}/bin
|
||||
|
||||
Execute ./bs_2G4_phy_v1 \
|
||||
-v=${verbosity_level} -s="${simulation_id}" -D=2 -sim_length=${sim_length_us} $@
|
||||
-v=${verbosity_level} -s="${simulation_id}" -D=2 -sim_length=10e6 $@
|
||||
|
||||
Execute "./$tester_exe" \
|
||||
-v=${verbosity_level} -s="${simulation_id}" -d=1 -testid=tester -RealEncryption=0 -rs=100
|
Loading…
Add table
Add a link
Reference in a new issue