1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sys/test_utils/print_stack_usage: add Kconfig support

This commit is contained in:
Kaspar Schleiser 2022-03-25 09:37:25 +01:00
parent 47dd3b1889
commit ba86f51b26
6 changed files with 21 additions and 6 deletions

View File

@ -10,5 +10,6 @@ menu "Test utilities"
rsource "dummy_thread/Kconfig"
rsource "interactive_sync/Kconfig"
rsource "print_stack_usage/Kconfig"
rsource "result_output/Kconfig"
endmenu # Test utilities

View File

@ -0,0 +1,10 @@
# Copyright (c) 2022 Freie Universität Berlin
# 2022 Inria
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#
config MODULE_TEST_UTILS_PRINT_STACK_USAGE
bool "Print stack usage metrics on stack exit"

View File

@ -1,13 +1,15 @@
APPLICATION ?= tests_$(notdir $(patsubst %/,%,$(CURDIR)))
ifneq (,$(wildcard $(CURDIR)/tests*/.))
DEFAULT_MODULE += test_utils_interactive_sync
# add interactive test configuration when testing Kconfig
ifeq (1,$(TEST_KCONFIG))
KCONFIG_ADD_CONFIG += $(RIOTBASE)/tests/test_interactive.config
endif
DEFAULT_MODULE += test_utils_interactive_sync
# add stack metric printing configuration when testing Kconfig
DEFAULT_MODULE += test_utils_print_stack_usage
# do the same for Kconfig builds
ifeq (1,$(TEST_KCONFIG))
KCONFIG_ADD_CONFIG += $(RIOTBASE)/tests/test_utils.config
endif
endif
ifneq (,$(filter tests_driver_%,$(APPLICATION)))

View File

@ -1 +0,0 @@
CONFIG_MODULE_TEST_UTILS_INTERACTIVE_SYNC=y

View File

@ -0,0 +1 @@
CONFIG_MODULE_TEST_UTILS_PRINT_STACK_USAGE=y

2
tests/test_utils.config Normal file
View File

@ -0,0 +1,2 @@
CONFIG_MODULE_TEST_UTILS_INTERACTIVE_SYNC=y
CONFIG_MODULE_TEST_UTILS_PRINT_STACK_USAGE=y