tests/bsim bt gatt/ccc_store: Minor cleanup

Ensure we call the common source script before using
the BOARD variable, and let's not set things
which are already set to the same by default

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
Alberto Escolar Piedras 2024-03-20 16:11:43 +01:00 committed by Alberto Escolar
commit 48e813ed6e
4 changed files with 13 additions and 32 deletions

View file

@ -1,14 +1,15 @@
#!/bin/env bash #!/usr/bin/env bash
# Copyright 2023 Nordic Semiconductor ASA # Copyright 2023 Nordic Semiconductor ASA
# 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" : "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}"
west build -b nrf52_bsim -d build_test && \ WORK_DIR="${WORK_DIR:-${ZEPHYR_BASE}/bsim_out}"
cp -v build_test/zephyr/zephyr.exe "${test_exe}" INCR_BUILD=1
source ${ZEPHYR_BASE}/tests/bsim/compile.source
west build -b nrf52_bsim -d build_test_2 -- -DCONF_FILE=prj_2.conf && \ app="$(guess_test_relpath)" compile
cp -v build_test_2/zephyr/zephyr.exe "${test_exe_2}" app="$(guess_test_relpath)" conf_file=prj_2.conf compile
wait_for_background_jobs

View file

@ -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="${bsim_bin}/bs_${BOARD}_tests_bsim_bluetooth_host_gatt_ccc_store_prj_conf"
test_exe_2="${bsim_bin}/bs_${BOARD}_tests_bsim_bluetooth_host_gatt_ccc_store_prj_2_conf"

View file

@ -4,11 +4,9 @@
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
test_name='ccc_store' test_exe="bs_${BOARD}_$(guess_test_long_name)_prj_conf"
test_exe="bs_${BOARD}_tests_bsim_bluetooth_host_gatt_${test_name}_prj_conf" simulation_id="ccc_store"
simulation_id="${test_name}"
verbosity_level=2 verbosity_level=2
EXECUTE_TIMEOUT=30
cd ${BSIM_OUT_PATH}/bin cd ${BSIM_OUT_PATH}/bin

View file

@ -4,11 +4,9 @@
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
test_name='ccc_store' test_exe="bs_${BOARD}_$(guess_test_long_name)_prj_2_conf"
test_exe="bs_${BOARD}_tests_bsim_bluetooth_host_gatt_${test_name}_prj_2_conf" simulation_id="ccc_store_2"
simulation_id="${test_name}_2"
verbosity_level=2 verbosity_level=2
EXECUTE_TIMEOUT=30
cd ${BSIM_OUT_PATH}/bin cd ${BSIM_OUT_PATH}/bin