1#!/usr/bin/env bash
2#
3# Copyright (c) 2023 Nordic Semiconductor ASA
4#
5# SPDX-License-Identifier: Apache-2.0
6
7# CSIP test where the Set Members releases the lock
8
9source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
10
11VERBOSITY_LEVEL=2
12EXECUTE_TIMEOUT=20
13
14cd ${BSIM_OUT_PATH}/bin
15
16SIMULATION_ID="csip_forced_release"
17
18printf "\n\n======== Running test with forced release of lock ========\n\n"
19Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
20  -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=0 -testid=csip_set_coordinator \
21  -RealEncryption=1 -rs=1
22
23Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
24  -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=1 -testid=csip_set_member \
25  -RealEncryption=1 -rs=2 -argstest rank 1
26
27Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
28  -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=2 -testid=csip_set_member \
29  -RealEncryption=1 -rs=3 -argstest rank 2
30
31Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
32  -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=3 -testid=csip_set_member_release \
33  -RealEncryption=1 -rs=4 -argstest rank 3
34
35# Simulation time should be larger than the WAIT_TIME in common.h
36Execute ./bs_2G4_phy_v1 -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} \
37  -D=4 -sim_length=60e6 $@
38
39wait_for_background_jobs
40