From c36cf5743f08dadcc0432cf23a24836d633ccaef Mon Sep 17 00:00:00 2001 From: MrKevinWeiss Date: Tue, 5 Mar 2019 14:21:44 +0100 Subject: [PATCH] tests/shell: Add app_metadata to shell tests Adds app_metadata to the shell test This both serves as a simple test to see if the module is available and doesn't crash as well as an example --- sys/Makefile.include | 5 ++++- sys/include/app_metadata.h | 6 +++--- tests/shell/Makefile | 6 ++++++ tests/shell/tests/01-run.py | 3 ++- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/sys/Makefile.include b/sys/Makefile.include index 7c1fab6e97..ae261c840b 100644 --- a/sys/Makefile.include +++ b/sys/Makefile.include @@ -32,7 +32,10 @@ ifneq (,$(filter oneway_malloc,$(USEMODULE))) endif ifneq (,$(filter app_metadata,$(USEMODULE))) - # Overwrite the interface version + # Overwrite the application shell formats. + # This is an optional macro that can be used to coordinate + # standardized shell formats, as an example it can point to an RDM + # that specifies semantics. ifdef APP_SHELL_FMT CFLAGS += -DAPP_SHELL_FMT=\"$(APP_SHELL_FMT)\" endif diff --git a/sys/include/app_metadata.h b/sys/include/app_metadata.h index fcbd847b84..555bbea74d 100644 --- a/sys/include/app_metadata.h +++ b/sys/include/app_metadata.h @@ -33,9 +33,9 @@ extern "C" { * say semantics defined in a RDM or schema, that could be specified * by adding APP_SHELL_FMT="RDM001_v1", that would inform anything * using the shell that the formatting should follow what is dictated. - * This define is only for documentation, to use the APP_SHELL_FMT - * add it to the application makefile with APP_SHELL_FMT= - * or when calling make such as `APP_SHELL_FMT= make flash` + * @note This define is only for documentation, to use the APP_SHELL_FMT + * add it to the application makefile with APP_SHELL_FMT=your_value + * or when calling make such as `APP_SHELL_FMT=your_value make flash` */ #define APP_SHELL_FMT #endif diff --git a/tests/shell/Makefile b/tests/shell/Makefile index 3ebf08503c..7b2358601a 100644 --- a/tests/shell/Makefile +++ b/tests/shell/Makefile @@ -1,6 +1,7 @@ DEVELHELP=0 include ../Makefile.tests_common +USEMODULE += app_metadata USEMODULE += shell USEMODULE += shell_commands USEMODULE += ps @@ -10,6 +11,11 @@ DISABLE_MODULE += auto_init # chronos is missing a getchar implementation BOARD_BLACKLIST += chronos +BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove \ + arduino-uno + TEST_ON_CI_WHITELIST += all +APP_SHELL_FMT ?= NONE + include $(RIOTBASE)/Makefile.include diff --git a/tests/shell/tests/01-run.py b/tests/shell/tests/01-run.py index 25237e5b74..3451dc6cbd 100755 --- a/tests/shell/tests/01-run.py +++ b/tests/shell/tests/01-run.py @@ -17,7 +17,8 @@ EXPECTED_HELP = ( 'end_test ends a test', 'echo prints the input command', 'reboot Reboot the node', - 'ps Prints information about running threads.' + 'ps Prints information about running threads.', + 'app_metadata Returns application metadata' ) EXPECTED_PS = (