Commit 7c620b9d authored by Ederson de Souza's avatar Ederson de Souza Committed by Jamie
Browse files

samples/runtime-source: Make it buildable on twister



This sample has two parts: hooks for an mcuboot instance and a target
application. For the first, a new entry at boot/zephyr/sample.yaml is
added as well as a corresponding change at boot/zephyr/CMakeLists.txt to
include the hook as a module. For the second, added a sample.yaml as
well as invoke it from the github workflow.

Signed-off-by: default avatarEderson de Souza <ederson.desouza@intel.com>
parent 1017c43b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@ jobs:
              -T ../bootloader/mcuboot/boot/zephyr
              -T ./tests/subsys/dfu
              -T ./samples/subsys/mgmt/mcumgr/smp_svr
              -T ../bootloader/mcuboot/samples/runtime-source/zephyr/app
        run: |
          export ZEPHYR_BASE=${PWD}
          export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
+6 −0
Original line number Diff line number Diff line
@@ -7,6 +7,12 @@

cmake_minimum_required(VERSION 3.13.1)

# This sample shows usage of an external module and we need to set the
# set the extra module path before calling find_package(Zephyr).
if(TEST_RUNTIME_SOURCE_HOOKS)
  set(EXTRA_ZEPHYR_MODULES "${CMAKE_SOURCE_DIR}/../../samples/runtime-source/zephyr/hooks")
endif()

# find_package(Zephyr) in order to load application boilerplate:
# http://docs.zephyrproject.org/application/application.html
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
+6 −0
Original line number Diff line number Diff line
@@ -96,3 +96,9 @@ tests:
    integration_platforms:
      - nrf52840dk/nrf52840
    tags: bootloader_mcuboot
  sample.bootloader.mcuboot.runtime_source.hooks:
    extra_args: EXTRA_CONF_FILE=../../samples/runtime-source/zephyr/sample.conf
      TEST_RUNTIME_SOURCE_HOOKS=y
    tags: bootloader_mcuboot runtime_source
    platform_allow: frdm_k64f
    build_only: true
+10 −0
Original line number Diff line number Diff line
sample:
  name: Runtime source target
  description: Application loaded from mcuboot using runtime source hooks
common:
  build_only: true
tests:
    sample.zephyr.runtime_source.app:
      tags: samples tests runtime_source
      platform_allow:
        - frdm_k64f