1#!/usr/bin/env bash
2# Copyright (c) 2024 Nordic Semiconductor
3# SPDX-License-Identifier: Apache-2.0
4
5set -eu
6
7source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
8
9test_name="$(guess_test_long_name)"
10simulation_id=${test_name}
11verbosity_level=2
12EXECUTE_TIMEOUT=120
13
14# sixty-second (maximum) sim time.
15# The test will exit simulation as soon as it has passed.
16SIM_LEN_US=$((60 * 1000 * 1000))
17
18test_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_prj_conf"
19
20cd ${BSIM_OUT_PATH}/bin
21
22Execute "${test_exe}" -v=${verbosity_level} -s=${simulation_id} -d=0 -rs=420 -testid=dut \
23		-argstest log_level 3
24Execute "${test_exe}" -v=${verbosity_level} -s=${simulation_id} -d=1 -rs=69  -testid=peer \
25		-argstest log_level 3 >/dev/null
26
27Execute ./bs_2G4_phy_v1 -defmodem=BLE_simple \
28    -v=${verbosity_level} -s=${simulation_id} -D=2 -sim_length=${SIM_LEN_US} $@
29
30wait_for_background_jobs
31