Skip to content

Commit efec595

Browse files
committed
tests: Added native POSIX to flash based tests
Added native POSIX boards as target for flash related tests. Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
1 parent d9846dc commit efec595

20 files changed

+169
-12
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CONFIG_ZTEST=y
2+
CONFIG_STDOUT_CONSOLE=y
3+
CONFIG_FLASH=y
4+
CONFIG_IMG_MANAGER=y
5+
CONFIG_MCUBOOT_IMG_MANAGER=y
6+
CONFIG_IMG_BLOCK_BUF_SIZE=512
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
tests:
2-
usb.device.image_util:
3-
depends_on: usb_device
4-
platform_whitelist: nrf52840_pca10056
2+
dfu.image_util:
3+
platform_whitelist: nrf52840_pca10056 native_posix
54
tags: dfu_image_util
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CONFIG_ZTEST=y
2+
CONFIG_STDOUT_CONSOLE=y
3+
CONFIG_FLASH=y
4+
CONFIG_IMG_MANAGER=y
5+
CONFIG_MCUBOOT_IMG_MANAGER=y
6+
CONFIG_IMG_BLOCK_BUF_SIZE=512
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
tests:
2-
usb.device.dfu:
3-
depends_on: usb_device
4-
platform_whitelist: nrf52840_pca10056
2+
dfu.mcuboot:
3+
platform_whitelist: nrf52840_pca10056 native_posix
54
tags: dfu_mcuboot
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CONFIG_FILE_SYSTEM=y
2+
CONFIG_LOG=y
3+
CONFIG_FAT_FILESYSTEM_ELM=y
4+
CONFIG_DISK_ACCESS_FLASH=y
5+
CONFIG_DISK_FLASH_DEV_NAME="flash_ctrl"
6+
CONFIG_DISK_FLASH_START=0
7+
CONFIG_DISK_FLASH_MAX_RW_SIZE=256
8+
CONFIG_DISK_ERASE_BLOCK_SIZE=0x1000
9+
CONFIG_DISK_FLASH_ERASE_ALIGNMENT=0x1000
10+
CONFIG_DISK_VOLUME_SIZE=0x200000
11+
CONFIG_ZTEST=y
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
tests:
22
filesystem.fat:
3-
platform_whitelist: arduino_101
3+
platform_whitelist: arduino_101 native_posix
44
tags: filesystem
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CONFIG_ZTEST=y
2+
CONFIG_STDOUT_CONSOLE=y
3+
CONFIG_FLASH=y
4+
CONFIG_FLASH_PAGE_LAYOUT=y
5+
CONFIG_FLASH_MAP=y
6+
CONFIG_FCB=y

tests/subsys/fs/fcb/testcase.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
tests:
22
filesystem.fcb:
33
platform_whitelist: nrf52840_pca10056 nrf52_pca10040 nrf51_pca10028
4+
native_posix
45
tags: flash_circural_buffer
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright (c) 2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/delete-node/ &storage_partition;
8+
/delete-node/ &scratch_partition;
9+
10+
&flash0 {
11+
/*
12+
* For more information, see:
13+
* http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions
14+
*/
15+
partitions {
16+
compatible = "fixed-partitions";
17+
#address-cells = <1>;
18+
#size-cells = <1>;
19+
20+
storage_partition: partition@70000 {
21+
label = "storage";
22+
reg = <0x00070000 0x10000>;
23+
};
24+
};
25+
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CONFIG_ZTEST=y
2+
CONFIG_STDOUT_CONSOLE=y
3+
CONFIG_FLASH=y
4+
CONFIG_FLASH_PAGE_LAYOUT=y
5+
CONFIG_FLASH_MAP=y
6+
CONFIG_FCB=y
7+
8+
CONFIG_SETTINGS=y
9+
CONFIG_SETTINGS_RUNTIME=y
10+
CONFIG_SETTINGS_FCB=y
11+
CONFIG_SETTINGS_USE_BASE64=y

0 commit comments

Comments
 (0)