1#!/usr/bin/env bash
2#
3# Copyright (c) 2019 Bose Corporation
4# Copyright (c) 2021 Nordic Semiconductor ASA
5#
6# SPDX-License-Identifier: Apache-2.0
7
8source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
9
10SIMULATION_ID="tbs_ccp"
11VERBOSITY_LEVEL=2
12EXECUTE_TIMEOUT=20
13
14cd ${BSIM_OUT_PATH}/bin
15
16printf "\n\n==== Running TBS Server Only (API) test ====n\n"
17
18Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
19  -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=0 -testid=tbs_test_server_only -rs=23
20
21# Simulation time should be larger than the WAIT_TIME in common.h
22Execute ./bs_2G4_phy_v1 -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} \
23  -D=1 -sim_length=60e6 $@
24
25wait_for_background_jobs
26
27printf "\n\n==== Running TBS server & client tests ====n\n"
28
29Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
30  -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=0 -testid=tbs -rs=23
31
32Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
33  -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=1 -testid=tbs_client -rs=6
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=2 -sim_length=60e6 $@
38
39wait_for_background_jobs
40