1#!/usr/bin/env bash
2# Copyright 2023 Nordic Semiconductor
3# SPDX-License-Identifier: Apache-2.0
4
5source $(dirname "${BASH_SOURCE[0]}")/../../_mesh_test.sh
6
7# Test that GATT advertisement is stopped when suspending Mesh, and that it is started again
8# when Mesh is resumed.
9#
10# Test procedure:
11# 0. DUT (Device 0) initializes the Mesh stack, and starts provisioning procedure using
12#    bt_mesh_prov_enable(BT_MESH_PROV_GATT).
13# 1. Tester (Device 1) observes PB-GATT advs, and will fail the test if the expected
14#    amount of advs is not received.
15# 2. DUT is provisioned, and Tester observes GATT proxy advs.
16# 3. DUT notifies the Tester that it will be suspended, and Tester observes for advs after a
17#    brief delay. Receiving an adv while DUT is suspended will cause the test to fail.
18# 4. After a delay, the DUT resumes and notifies the Tester, which checks that the
19#    advertising resumes.
20
21overlay=overlay_gatt_conf
22RunTest mesh_gatt_suspend_resume \
23	suspend_dut_gatt_suspend_resume suspend_tester_gatt
24
25overlay="overlay_gatt_conf_overlay_low_lat_conf"
26RunTest mesh_gatt_suspend_resume_low_lat \
27	suspend_dut_gatt_suspend_resume suspend_tester_gatt
28
29overlay="overlay_gatt_conf_overlay_psa_conf"
30RunTest mesh_gatt_suspend_resume_psa \
31	suspend_dut_gatt_suspend_resume suspend_tester_gatt
32