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_access_data_check persistence_access_data_save -flash_erase
13
14overlay=overlay_pst_conf
15RunTestFlash mesh_pst_access_data_check persistence_access_data_load \
16	-- -argstest access-cfg=configured
17
18overlay=overlay_pst_conf
19RunTestFlash mesh_pst_access_data_check persistence_access_sub_overwrite \
20	-- -argstest access-cfg=configured
21
22overlay=overlay_pst_conf
23RunTestFlash mesh_pst_access_data_check persistence_access_data_load \
24	-- -argstest access-cfg=new-subs
25
26overlay=overlay_pst_conf
27RunTestFlash mesh_pst_access_data_check persistence_access_data_remove \
28	-- -argstest access-cfg=new-subs
29
30overlay=overlay_pst_conf
31RunTestFlash mesh_pst_access_data_check persistence_access_data_load -flash_rm \
32	-- -argstest access-cfg=not-configured
33
34overlay="overlay_pst_conf_overlay_psa_conf"
35RunTestFlash mesh_pst_access_data_check_psa persistence_access_data_save -flash_erase
36
37overlay="overlay_pst_conf_overlay_psa_conf"
38RunTestFlash mesh_pst_access_data_check_psa persistence_access_data_load \
39	-- -argstest access-cfg=configured
40
41overlay="overlay_pst_conf_overlay_psa_conf"
42RunTestFlash mesh_pst_access_data_check_psa persistence_access_sub_overwrite \
43	-- -argstest access-cfg=configured
44
45overlay="overlay_pst_conf_overlay_psa_conf"
46RunTestFlash mesh_pst_access_data_check_psa persistence_access_data_load \
47	-- -argstest access-cfg=new-subs
48
49overlay="overlay_pst_conf_overlay_psa_conf"
50RunTestFlash mesh_pst_access_data_check_psa persistence_access_data_remove \
51	-- -argstest access-cfg=new-subs
52
53overlay="overlay_pst_conf_overlay_psa_conf"
54RunTestFlash mesh_pst_access_data_check_psa persistence_access_data_load -flash_rm \
55	-- -argstest access-cfg=not-configured
56