1#!/usr/bin/env bash
2# Copyright 2021 Nordic Semiconductor
3# SPDX-License-Identifier: Apache-2.0
4
5source $(dirname "${BASH_SOURCE[0]}")/../../_mesh_test.sh
6
7# Note:
8# Tests must be added in pairs and in sequence.
9# First test: saves data; second test: verifies it.
10
11overlay=overlay_pst_conf
12RunTestFlash mesh_pst_cfg_check persistence_cfg_save -flash_erase \
13    -- -argstest stack-cfg=0
14
15overlay=overlay_pst_conf
16RunTestFlash mesh_pst_cfg_check persistence_cfg_load -flash_rm \
17    -- -argstest stack-cfg=0
18
19overlay=overlay_pst_conf
20RunTestFlash mesh_pst_cfg_check persistence_cfg_save -flash_erase \
21    -- -argstest stack-cfg=1
22
23overlay=overlay_pst_conf
24RunTestFlash mesh_pst_cfg_check persistence_cfg_load -flash_rm \
25    -- -argstest stack-cfg=1
26
27overlay="overlay_pst_conf_overlay_psa_conf"
28RunTestFlash mesh_pst_cfg_check_psa persistence_cfg_save -flash_erase \
29    -- -argstest stack-cfg=0
30
31overlay="overlay_pst_conf_overlay_psa_conf"
32RunTestFlash mesh_pst_cfg_check_psa persistence_cfg_load -flash_rm \
33    -- -argstest stack-cfg=0
34
35overlay="overlay_pst_conf_overlay_psa_conf"
36RunTestFlash mesh_pst_cfg_check_psa persistence_cfg_save -flash_erase \
37    -- -argstest stack-cfg=1
38
39overlay="overlay_pst_conf_overlay_psa_conf"
40RunTestFlash mesh_pst_cfg_check_psa persistence_cfg_load -flash_rm \
41    -- -argstest stack-cfg=1
42