Skip to content

Commit

Permalink
tests: add build-only test for kernel_service
Browse files Browse the repository at this point in the history
Add a build-only test for `kernel_services` module that builds
every file.

Signed-off-by: Yong Cong Sin <[email protected]>
Signed-off-by: Yong Cong Sin <[email protected]>
  • Loading branch information
ycsin committed Sep 18, 2024
1 parent 5d956e1 commit cada88f
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/subsys/shell/modules/kernel_service/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-License-Identifier: Apache-2.0

cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(kernel_service)

FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources})
16 changes: 16 additions & 0 deletions tests/subsys/shell/modules/kernel_service/prj.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
CONFIG_TEST=y

CONFIG_SHELL=y

CONFIG_REBOOT=y
CONFIG_INIT_STACKS=y
CONFIG_THREAD_MONITOR=y
CONFIG_THREAD_NAME=y
CONFIG_THREAD_STACK_INFO=y

CONFIG_HEAP_MEM_POOL_SIZE=64
CONFIG_SYS_HEAP_RUNTIME_STATS=y

CONFIG_LOG=y
CONFIG_LOG_MODE_DEFERRED=y
CONFIG_LOG_RUNTIME_FILTERING=y
10 changes: 10 additions & 0 deletions tests/subsys/shell/modules/kernel_service/src/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* Copyright (c) 2012-2014 Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/

int main(void)
{
return 0;
}
11 changes: 11 additions & 0 deletions tests/subsys/shell/modules/kernel_service/testcase.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
common:
tags: shell
build_only: true

tests:
shell.modules.kernel_service.all:
platform_allow:
- qemu_riscv64/qemu_virt_riscv64/smp
extra_configs:
- CONFIG_SCHED_CPU_MASK=y
- CONFIG_ARCH_STACKWALK=y

0 comments on commit cada88f

Please sign in to comment.