1#!/usr/bin/env bash
2# Copyright 2022 Nordic Semiconductor ASA
3# SPDX-License-Identifier: Apache-2.0
4
5source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
6
7# Disable with GATT test: A central acting as a GATT client scans for and connects
8# to a peripheral acting as a GATT server. The GATT client will then attempt
9# to write and read to and from a few GATT characteristics. Both the central and
10# peripheral then disable bluetooth and the test repeats.
11simulation_id="disable_with_gatt"
12verbosity_level=2
13EXECUTE_TIMEOUT=120
14
15cd ${BSIM_OUT_PATH}/bin
16
17Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_misc_disable_prj_conf \
18  -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=gatt_client
19
20Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_misc_disable_prj_conf \
21  -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=gatt_server
22
23Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \
24  -D=2 -sim_length=600e6 $@
25
26wait_for_background_jobs
27