1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 22:13:52 +01:00
RIOT/tests/sys/shell/Makefile
Marian Buschsieweke b858614fec
tests/sys/shell: make test more robust
This changes the behavior of the test script for verifying the `help`
command: It no longer assumes a specific order for the list of commands.

Making the test robust is a bit tricky, as the module
`shell_cmds_default` that is used here may add commands specific to a
set of board. We use `help_json` to get the list of commands actually
provided, so that we know how many rows the command table printed
by `help` need to be parsed.

A minimum set of commands that *must* be present for all boards is
hard-coded in the test script and the actually provided commands are
tested against this. Otherwise e.g. an empty list of commands presented
by `help` and `help_json` would also pass.

Co-authored-by: benpicco <benpicco@googlemail.com>
2024-11-25 17:23:26 +01:00

35 lines
987 B
Makefile

DEVELHELP=0
include ../Makefile.sys_common
USEMODULE += app_metadata
USEMODULE += shell_cmds_default
USEMODULE += ps
USEMODULE += ztimer_msec
# JSON help is needed by test script
USEMODULE += shell_builtin_cmd_help_json
# Use a terminal that does not introduce extra characters into the stream.
RIOT_TERMINAL ?= socat
APP_SHELL_FMT ?= NONE
# microbit qemu failing currently
TEST_ON_CI_BLACKLIST += microbit
# requires #19005
TEST_ON_CI_BLACKLIST += native native64
include $(RIOTBASE)/Makefile.include
CFLAGS += '-DTHREAD_STACKSIZE_MAIN=(THREAD_STACKSIZE_SMALL+THREAD_EXTRA_STACKSIZE_PRINTF)'
# the test script skips tests if socat is not used
$(call target-export-variables,$(RIOT_TERMINAL),RIOT_TERMINAL)
# skip reboot for boards using highlevel_stdio that would disconnect during reboot
ifneq (,$(filter highlevel_stdio,$(FEATURES_USED)))
TESTRUNNER_SHELL_SKIP_REBOOT := 1
endif
$(call target-export-variables,$(TESTRUNNER_SHELL_SKIP_REBOOT),TESTRUNNER_SHELL_SKIP_REBOOT)