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 DFU Slot API. This tests are meant to be executed in sequence to work properly.
8#  - First test creates slots and saves them in storage.
9#  - Second test is rebooted device that restores saved slots from storage and checks their state.
10#  - Third test is rebooted device that deletes all previously added slots
11#    and verifies they do not exist.
12#  - Fourth test is rebooted device that verifies if removing all slots also removed them
13#    from storage.
14overlay=overlay_pst_conf
15RunTestFlash dfu_slot dfu_dist_dfu_slot_create -flash_erase
16
17RunTestFlash dfu_slot dfu_dist_dfu_slot_create_recover
18
19RunTestFlash dfu_slot dfu_dist_dfu_slot_delete_all
20
21RunTestFlash dfu_slot dfu_dist_dfu_slot_check_delete_all -flash_rm
22
23overlay="overlay_pst_conf_overlay_psa_conf"
24RunTestFlash dfu_slot_psa dfu_dist_dfu_slot_create -flash_erase
25
26RunTestFlash dfu_slot_psa dfu_dist_dfu_slot_create_recover
27
28RunTestFlash dfu_slot_psa dfu_dist_dfu_slot_delete_all
29
30RunTestFlash dfu_slot_psa dfu_dist_dfu_slot_check_delete_all -flash_rm
31