tests/bsim bt gatt/settings: Use common scripts

Use the common scripts and do a minor cleanup

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
Alberto Escolar Piedras 2024-03-20 16:38:00 +01:00 committed by Alberto Escolar
commit f1aaff5115
4 changed files with 12 additions and 28 deletions

View file

@ -3,14 +3,13 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
set -eu set -eu
bash_source_dir="$(realpath "$(dirname "${BASH_SOURCE[0]}")")" : "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}"
# Read variable definitions output by _env.sh WORK_DIR="${WORK_DIR:-${ZEPHYR_BASE}/bsim_out}"
source "${bash_source_dir}/_env.sh" INCR_BUILD=1
source ${ZEPHYR_BASE}/tests/bsim/compile.source
# Place yourself in the test's root (i.e. ./../) app="$(guess_test_relpath)" compile
west build -b nrf52_bsim -d build_test && \ app="$(guess_test_relpath)" conf_file=prj_2.conf compile
cp build_test/zephyr/zephyr.exe "${test_exe}"
west build -b nrf52_bsim -d build_test_2 -- -DCONF_FILE=prj_2.conf && \ wait_for_background_jobs
cp build_test_2/zephyr/zephyr.exe "${test_2_exe}"

View file

@ -1,11 +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]}")")"
test_name="$(basename "$(realpath "$bash_source_dir/..")")"
bsim_bin="${BSIM_OUT_PATH}/bin"
BOARD="${BOARD:-nrf52_bsim}"
test_exe="${bsim_bin}/bs_${BOARD}_tests_bsim_bluetooth_host_gatt_settings_prj_conf"
test_2_exe="${bsim_bin}/bs_${BOARD}_tests_bsim_bluetooth_host_gatt_settings_prj_2_conf"

View file

@ -3,14 +3,12 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
set -eu set -eu
bash_source_dir="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
source "${bash_source_dir}/_env.sh"
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
simulation_id="${test_name}" simulation_id="settings"
verbosity_level=2 verbosity_level=2
EXECUTE_TIMEOUT=30 EXECUTE_TIMEOUT=120
test_exe="./bs_${BOARD}_$(guess_test_long_name)_prj_conf"
cd ${BSIM_OUT_PATH}/bin cd ${BSIM_OUT_PATH}/bin

View file

@ -3,14 +3,12 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
set -eu set -eu
bash_source_dir="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
source "${bash_source_dir}/_env.sh"
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
simulation_id="${test_name}_2" simulation_id="settings_2"
verbosity_level=2 verbosity_level=2
EXECUTE_TIMEOUT=120 EXECUTE_TIMEOUT=120
test_2_exe="./bs_${BOARD}_$(guess_test_long_name)_prj_2_conf"
cd ${BSIM_OUT_PATH}/bin cd ${BSIM_OUT_PATH}/bin