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=120
13
14cd ${BSIM_OUT_PATH}/bin
15
16printf "\n\n==== Running TBS Server Only (API) test ====n\n"
17
18Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_audio_prj_conf \
19  -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=0 -testid=tbs_test_server_only \
20  -RealEncryption=1 -rs=23 -D=1
21
22# Simulation time should be larger than the WAIT_TIME in common.h
23Execute ./bs_2G4_phy_v1 -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} \
24  -D=1 -sim_length=60e6 $@
25
26wait_for_background_jobs
27
28printf "\n\n==== Running TBS server & client tests ====n\n"
29
30Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_audio_prj_conf \
31  -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=0 -testid=tbs \
32  -RealEncryption=1 -rs=23 -D=2
33
34Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_audio_prj_conf \
35  -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=1 -testid=tbs_client \
36  -RealEncryption=1 -rs=6 -D=2
37
38# Simulation time should be larger than the WAIT_TIME in common.h
39Execute ./bs_2G4_phy_v1 -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} \
40  -D=2 -sim_length=60e6 $@
41
42wait_for_background_jobs
43