tests/bsim/bluetooth/host/gatt: Use common scripts

Use the common functions instead of replicating functionality

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
Alberto Escolar Piedras 2024-03-21 14:30:54 +01:00 committed by Alberto Escolar
commit 1d231dda33

View file

@ -1,18 +1,15 @@
#!/bin/env bash
#!/usr/bin/env bash
# Copyright 2023 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
set -eu
# Terminate running simulations (if any)
${BSIM_COMPONENTS_PATH}/common/stop_bsim.sh
: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}"
test_name='sc_indicate'
WORK_DIR="${WORK_DIR:-${ZEPHYR_BASE}/bsim_out}"
INCR_BUILD=1
source ${ZEPHYR_BASE}/tests/bsim/compile.source
: "${BSIM_OUT_PATH:?BSIM_OUT_PATH must be defined}"
bsim_bin="${BSIM_OUT_PATH}/bin"
BOARD="${BOARD:-nrf52_bsim}"
test_exe="${bsim_bin}/bs_${BOARD}_tests_bsim_bluetooth_host_gatt_${test_name}_prj_conf"
app="$(guess_test_relpath)" compile
west build -b nrf52_bsim -d build && \
cp -v build/zephyr/zephyr.exe "${test_exe}"
wait_for_background_jobs