tests: boot: test_mcuboot: Add swap using offset test

Adds a variation of the test which tests swap using offset mode,
based on the swap using move test

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
Jamie McCrae 2025-01-28 10:27:19 +00:00 committed by Benjamin Cabé
commit b33c87caa0
2 changed files with 15 additions and 2 deletions

View file

@ -1,9 +1,13 @@
# Copyright 2022 NXP # Copyright 2022 NXP
# Copyright 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
source "Kconfig.zephyr" source "Kconfig.zephyr"
# Workaround for not being able to have commas in macro arguments # Workaround for not being able to have commas in macro arguments
DT_CHOSEN_Z_CODE_PARTITION := zephyr,code-partition DT_CHOSEN_Z_CODE_PARTITION := zephyr,code-partition
config BUILD_OUTPUT_ADJUST_LMA config BUILD_OUTPUT_ADJUST_LMA
default "$(dt_node_reg_addr_hex,$(dt_nodelabel_path,slot1_partition))-\
$(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION))+\
$(dt_node_int_prop_hex,$(dt_node_parent,$(dt_node_parent,$(dt_nodelabel_path,slot1_partition))),erase-block-size)" if MCUBOOT_BOOTLOADER_MODE_SWAP_USING_OFFSET
default "$(dt_node_reg_addr_hex,$(dt_nodelabel_path,slot1_partition))-\ default "$(dt_node_reg_addr_hex,$(dt_nodelabel_path,slot1_partition))-\
$(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION))" $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION))"

View file

@ -1,5 +1,6 @@
common: common:
sysbuild: true sysbuild: true
tags: mcuboot
harness: console harness: console
harness_config: harness_config:
type: multi_line type: multi_line
@ -11,7 +12,6 @@ common:
- "Swapped application booted on (.*)" - "Swapped application booted on (.*)"
tests: tests:
bootloader.mcuboot: bootloader.mcuboot:
tags: mcuboot
platform_allow: platform_allow:
- frdm_k22f - frdm_k22f
- frdm_k64f - frdm_k64f
@ -48,8 +48,17 @@ tests:
- frdm_k64f - frdm_k64f
- nrf52840dk/nrf52840 - nrf52840dk/nrf52840
bootloader.mcuboot.assert: bootloader.mcuboot.assert:
tags: mcuboot
platform_allow: platform_allow:
- b_u585i_iot02a - b_u585i_iot02a
extra_configs: extra_configs:
- CONFIG_ASSERT=y - CONFIG_ASSERT=y
bootloader.mcuboot.swap_using_offset:
platform_allow:
- frdm_k64f
- nrf5340dk/nrf5340/cpuapp
integration_platforms:
- frdm_k64f
- nrf5340dk/nrf5340/cpuapp
extra_args:
- SB_CONFIG_MCUBOOT_MODE_SWAP_USING_OFFSET=y
- swapped_app_CONFIG_MCUBOOT_BOOTLOADER_MODE_SWAP_USING_OFFSET=y