Skip to content

Commit

Permalink
tests: skip mfg tests
Browse files Browse the repository at this point in the history
Skip mfg tests for now.
Relace existing tests with simple read write test.

Signed-off-by: Krzysztof Taborowski <[email protected]>
  • Loading branch information
ktaborowski committed Dec 19, 2024
1 parent 8783621 commit a9d903f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 8 deletions.
9 changes: 1 addition & 8 deletions tests/integration/mfg/testcase.yaml
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
35 changes: 35 additions & 0 deletions tests_new/integration/mfg/src/main.c
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);

0 comments on commit a9d903f

Please sign in to comment.