mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #16037 from miri64/shell/enh/kconfig-dep-config
shell/Kconfig: make config options usable with dependency resolution
This commit is contained in:
commit
6dd49ead83
4
.murdock
4
.murdock
@ -8,7 +8,7 @@
|
||||
: ${TEST_BOARDS_LLVM_COMPILE:=""}
|
||||
|
||||
: ${TEST_KCONFIG_samr21_xpro:="examples/hello-world tests/periph_*
|
||||
tests/xtimer_* tests/ztimer_*
|
||||
tests/test_tools tests/xtimer_* tests/ztimer_*
|
||||
tests/driver_ad7746 tests/driver_adcxx1c tests/driver_ads101x tests/driver_adt101x
|
||||
tests/driver_adt7310 tests/driver_adxl345 tests/driver_aip31068 tests/driver_apa102
|
||||
tests/driver_apds99xx tests/driver_apds99xx_full tests/driver_at tests/driver_at24cxxx
|
||||
@ -25,7 +25,7 @@ tests/mtd_mapper tests/driver_o* tests/driver_p* tests/driver_q*
|
||||
tests/driver_r* tests/driver_s* tests/driver_t* tests/driver_u*
|
||||
tests/driver_v*"}
|
||||
: ${TEST_KCONFIG_native:="examples/hello-world tests/periph_* tests/sys_crypto
|
||||
tests/prng_* tests/xtimer_* tests/ztimer_* tests/driver_ws281x
|
||||
tests/test_tools tests/prng_* tests/xtimer_* tests/ztimer_* tests/driver_ws281x
|
||||
tests/posix_sleep"}
|
||||
|
||||
: ${TEST_WITH_CONFIG_SUPPORTED:="examples/suit_update tests/driver_at86rf2xx_aes"}
|
||||
|
@ -5,6 +5,19 @@
|
||||
# directory for more details.
|
||||
#
|
||||
|
||||
if !TEST_KCONFIG
|
||||
|
||||
menuconfig KCONFIG_USEMODULE_SHELL
|
||||
bool "Configure the Shell interpreter"
|
||||
depends on USEMODULE_SHELL
|
||||
|
||||
if KCONFIG_USEMODULE_SHELL
|
||||
rsource "Kconfig.config"
|
||||
endif # KCONFIG_USEMODULE_SHELL
|
||||
|
||||
endif # !TEST_KCONFIG
|
||||
|
||||
if TEST_KCONFIG
|
||||
menuconfig MODULE_SHELL
|
||||
bool "Shell interpreter"
|
||||
select MODULE_STDIN
|
||||
@ -12,25 +25,8 @@ menuconfig MODULE_SHELL
|
||||
|
||||
rsource "commands/Kconfig"
|
||||
|
||||
menuconfig KCONFIG_USEMODULE_SHELL
|
||||
bool "Configure the Shell interpreter"
|
||||
depends on USEMODULE_SHELL
|
||||
if MODULE_SHELL
|
||||
rsource "Kconfig.config"
|
||||
endif
|
||||
|
||||
if KCONFIG_USEMODULE_SHELL
|
||||
|
||||
config SHELL_SHUTDOWN_ON_EXIT
|
||||
bool "Shutdown RIOT on shell exit"
|
||||
default y if CPU_NATIVE
|
||||
help
|
||||
Some systems (e.g Ubuntu 20.04) close stdin on CTRL-D / EOF
|
||||
That means we can't just re-start the shell.
|
||||
Instead terminate RIOT, which is also the behavior a user would expect
|
||||
from a CLI application.
|
||||
|
||||
config SHELL_NO_ECHO
|
||||
bool "Disable echo"
|
||||
|
||||
config SHELL_NO_PROMPT
|
||||
bool "Disable prompt"
|
||||
|
||||
endif # KCONFIG_USEMODULE_SHELL
|
||||
endif # TEST_KCONFIG
|
||||
|
26
sys/shell/Kconfig.config
Normal file
26
sys/shell/Kconfig.config
Normal file
@ -0,0 +1,26 @@
|
||||
# Copyright (c) 2021 Freie Universität
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# XXX This file only is required since there is no easy way to use these config
|
||||
# options with both the final MODULE_SHELL and KCONFIG_USEMODULE_SHELL in a
|
||||
# nicely looking and easy to migrate way. After migration, the content of this
|
||||
# file can be folded back into `sys/shell/Kconfig`
|
||||
|
||||
config SHELL_SHUTDOWN_ON_EXIT
|
||||
bool "Shutdown RIOT on shell exit"
|
||||
default y if HAS_CPU_NATIVE
|
||||
help
|
||||
Some systems (e.g Ubuntu 20.04) close stdin on CTRL-D / EOF
|
||||
That means we can't just re-start the shell.
|
||||
Instead terminate RIOT, which is also the behavior a user would expect
|
||||
from a CLI application.
|
||||
|
||||
config SHELL_NO_ECHO
|
||||
bool "Disable echo"
|
||||
|
||||
config SHELL_NO_PROMPT
|
||||
bool "Disable prompt"
|
5
tests/test_tools/app.config.test
Normal file
5
tests/test_tools/app.config.test
Normal file
@ -0,0 +1,5 @@
|
||||
CONFIG_MODULE_DUMMY_THREAD=y
|
||||
CONFIG_MODULE_SHELL=y
|
||||
CONFIG_MODULE_TEST_UTILS_INTERACTIVE_SYNC=n
|
||||
CONFIG_SHELL_NO_ECHO=y
|
||||
CONFIG_SHELL_NO_PROMPT=y
|
Loading…
Reference in New Issue
Block a user