-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip mfg tests for now. Relace existing tests with simple read write test. Signed-off-by: Krzysztof Taborowski <[email protected]>
- Loading branch information
1 parent
8783621
commit a9d903f
Showing
2 changed files
with
36 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,9 @@ | ||
tests: | ||
sidewalk.test.integration.mfg: | ||
skip: true | ||
sysbuild: true | ||
tags: Sidewalk | ||
platform_allow: | ||
- nrf52840dk/nrf52840 | ||
- nrf5340dk/nrf5340/cpuapp | ||
- nrf54l15dk/nrf54l15/cpuapp | ||
- nrf54l15dk/nrf54l15/cpuapp/ns | ||
- nrf54l15dk/nrf54l10/cpuapp | ||
integration_platforms: | ||
- nrf52840dk/nrf52840 | ||
- nrf5340dk/nrf5340/cpuapp | ||
- nrf54l15dk/nrf54l15/cpuapp | ||
- nrf54l15dk/nrf54l15/cpuapp/ns | ||
- nrf54l15dk/nrf54l10/cpuapp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright (c) 2022 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
*/ | ||
|
||
#include <zephyr/ztest.h> | ||
|
||
#include <sid_pal_mfg_store_ifc.h> | ||
#include <sid_error.h> | ||
#include <zephyr/storage/flash_map.h> | ||
|
||
ZTEST(mfg, test_mfg_storage_read_write) | ||
{ | ||
uint8_t write_data[SID_PAL_MFG_STORE_DEVID_SIZE] = { 1, 2, 3, 4, 5 }; | ||
uint8_t read_data[SID_PAL_MFG_STORE_DEVID_SIZE] = { 0 }; | ||
|
||
sid_pal_mfg_store_region_t mfg_store_region = { | ||
.addr_start = (uintptr_t)(FIXED_PARTITION_OFFSET(mfg_storage)), | ||
.addr_end = (uintptr_t)(FIXED_PARTITION_OFFSET(mfg_storage) + | ||
FIXED_PARTITION_SIZE(mfg_storage)), | ||
.app_value_to_offset = NULL | ||
}; | ||
sid_pal_mfg_store_init(mfg_store_region); | ||
|
||
zassert_equal(SID_ERROR_NONE, sid_pal_mfg_store_write(SID_PAL_MFG_STORE_SERIAL_NUM, write_data, sizeof(write_data))); | ||
|
||
sid_pal_mfg_store_read(SID_PAL_MFG_STORE_DEVID, read_data, sizeof(read_data)); | ||
zassert_mem_equal(write_data, read_data, sizeof(write_data), | ||
"Read data does not match written data"); | ||
|
||
sid_pal_mfg_store_deinit(); | ||
} | ||
|
||
ZTEST_SUITE(mfg, NULL, NULL, NULL, NULL, NULL); |