Skip to content

Commit

Permalink
samples: add no-timers configuration which is runtime tested
Browse files Browse the repository at this point in the history
Add no-timers configuration to sample.minimal to check that
it's actually working in runtime.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
  • Loading branch information
evgeniy-paltsev authored and nashif committed Aug 3, 2023
1 parent 6f62768 commit 168de28
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 1 deletion.
8 changes: 8 additions & 0 deletions samples/basic/minimal/Kconfig
@@ -0,0 +1,8 @@
# Copyright (c) 2023 Synopsys.
#
# SPDX-License-Identifier: Apache-2.0

config SAMPLE_DO_OUTPUT
bool "Do print from the main thread which can be checked"

source "Kconfig.zephyr"
10 changes: 10 additions & 0 deletions samples/basic/minimal/common-runtime.conf
@@ -0,0 +1,10 @@
# Drivers and peripherals
CONFIG_I2C=n
CONFIG_WATCHDOG=n
CONFIG_GPIO=n
CONFIG_PINCTRL=n
CONFIG_SPI=n
CONFIG_FLASH=n

# Boot
CONFIG_BOOT_DELAY=0
25 changes: 24 additions & 1 deletion samples/basic/minimal/sample.yaml
Expand Up @@ -3,10 +3,10 @@ sample:
name: minimal
common:
tags: footprint
build_only: true
tests:
sample.minimal.mt.arm:
extra_args: CONF_FILE='common.conf;mt.conf;arm.conf'
build_only: true
platform_allow:
- reel_board
- frdm_k64f
Expand All @@ -18,6 +18,7 @@ tests:
- frdm_k64f
sample.minimal.mt-no-preempt.arm:
extra_args: CONF_FILE='common.conf;mt.conf;no-preempt.conf;arm.conf'
build_only: true
platform_allow:
- reel_board
- frdm_k64f
Expand All @@ -27,6 +28,7 @@ tests:
- disco_l475_iot1
sample.minimal.mt-no-preempt-no-timers.arm:
extra_args: CONF_FILE='common.conf;mt.conf;no-preempt.conf;no-timers.conf;arm.conf'
build_only: true
platform_allow:
- reel_board
- frdm_k64f
Expand All @@ -36,6 +38,7 @@ tests:
- disco_l475_iot1
sample.minimal.no-mt.arm:
extra_args: CONF_FILE='common.conf;no-mt.conf;arm.conf'
build_only: true
platform_allow:
- reel_board
- frdm_k64f
Expand All @@ -45,6 +48,7 @@ tests:
- disco_l475_iot1
sample.minimal.no-mt-no-timers.arm:
extra_args: CONF_FILE='common.conf;no-mt.conf;no-timers.conf;arm.conf'
build_only: true
platform_allow:
- reel_board
- frdm_k64f
Expand All @@ -54,16 +58,35 @@ tests:
- disco_l475_iot1
sample.minimal.mt.x86:
extra_args: CONF_FILE='common.conf;mt.conf;x86.conf'
build_only: true
platform_allow: qemu_x86
sample.minimal.mt-no-preempt.x86:
extra_args: CONF_FILE='common.conf;mt.conf;no-preempt.conf;x86.conf'
build_only: true
platform_allow: qemu_x86
sample.minimal.mt-no-preempt-no-timers.x86:
extra_args: CONF_FILE='common.conf;mt.conf;no-preempt.conf;no-timers.conf;x86.conf'
build_only: true
platform_allow: qemu_x86
sample.minimal.no-mt.x86:
extra_args: CONF_FILE='common.conf;no-mt.conf;x86.conf'
build_only: true
platform_allow: qemu_x86
sample.minimal.no-mt-no-timers.x86:
extra_args: CONF_FILE='common.conf;no-mt.conf;no-timers.conf;x86.conf'
build_only: true
platform_allow: qemu_x86
sample.minimal.no-timers.runtime:
extra_args:
- CONF_FILE='common-runtime.conf;no-timers.conf'
- CONFIG_SAMPLE_DO_OUTPUT=y
arch_allow: arc
tags:
- kernel
integration_platforms:
- qemu_arc_em
harness: console
harness_config:
type: one_line
regex:
- "Hello World from minimal!"
4 changes: 4 additions & 0 deletions samples/basic/minimal/src/main.c
Expand Up @@ -8,5 +8,9 @@

int main(void)
{
#ifdef CONFIG_SAMPLE_DO_OUTPUT
printk("Hello World from minimal!\n");
#endif

return 0;
}

0 comments on commit 168de28

Please sign in to comment.