1#!/usr/bin/env bash
2#
3# Copyright (c) 2020-2021 Nordic Semiconductor ASA
4#
5# SPDX-License-Identifier: Apache-2.0
6
7source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
8
9SIMULATION_ID="vcp"
10VERBOSITY_LEVEL=2
11EXECUTE_TIMEOUT=20
12
13cd ${BSIM_OUT_PATH}/bin
14
15printf "\n\n======== Running VCP Volume Renderer standalone (API) test =========\n\n"
16
17Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
18  -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=0 -testid=vcp_vol_rend_standalone -rs=23
19
20# Simulation time should be larger than the WAIT_TIME in common.h
21Execute ./bs_2G4_phy_v1 -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} \
22  -D=1 -sim_length=60e6 $@
23
24wait_for_background_jobs
25
26printf "\n\n======== Running VCP Volume Renderer and VCP Volume Controller test =========\n\n"
27
28Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
29  -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=0 -testid=vcp_vol_rend -rs=23
30
31Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
32  -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=1 -testid=vcp_vol_ctlr -rs=46
33
34# Simulation time should be larger than the WAIT_TIME in common.h
35Execute ./bs_2G4_phy_v1 -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} \
36  -D=2 -sim_length=60e6 $@
37
38wait_for_background_jobs
39