summaryrefslogtreecommitdiff
path: root/test/cmd_ut.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2020-02-26 21:48:18 +0100
committerSimon Glass <sjg@chromium.org>2020-04-16 08:07:58 -0600
commit395041b2fd2f1cb2c84127acb18d87c27c29448c (patch)
tree93e1c35b964d198a60ab31ec41bec1c5743c1a7f /test/cmd_ut.c
parent20fd256deb055479c9c0c9f0b1a9f9098c96f310 (diff)
downloadu-boot-395041b2fd2f1cb2c84127acb18d87c27c29448c.tar.gz
test: log functions with CONFIG_LOG=n
If CONFIG_LOG=n, we still expect output for log_err(), log_warning(), log_notice(), log_info() and in case of DEBUG=1 also for log_debug(). Provide unit tests verifying this. The tests depend on: CONFIG_CONSOLE_RECORD=y CONFIG_LOG=n CONFIG_UT_LOG=y It may be necessary to increase the value of CONFIG_SYS_MALLOC_F_LEN to accommodate CONFIG_CONSOLE_RECORD=y. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/cmd_ut.c')
-rw-r--r--test/cmd_ut.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/cmd_ut.c b/test/cmd_ut.c
index a3a9d49f7e..7fdcdbb1a6 100644
--- a/test/cmd_ut.c
+++ b/test/cmd_ut.c
@@ -60,6 +60,9 @@ static cmd_tbl_t cmd_ut_sub[] = {
#ifdef CONFIG_UT_LIB
U_BOOT_CMD_MKENT(lib, CONFIG_SYS_MAXARGS, 1, do_ut_lib, "", ""),
#endif
+#ifdef CONFIG_UT_LOG
+ U_BOOT_CMD_MKENT(log, CONFIG_SYS_MAXARGS, 1, do_ut_log, "", ""),
+#endif
#ifdef CONFIG_UT_TIME
U_BOOT_CMD_MKENT(time, CONFIG_SYS_MAXARGS, 1, do_ut_time, "", ""),
#endif
@@ -125,6 +128,9 @@ static char ut_help_text[] =
#ifdef CONFIG_UT_LIB
"ut lib [test-name] - test library functions\n"
#endif
+#ifdef CONFIG_UT_LOG
+ "ut log [test-name] - test logging functions\n"
+#endif
#ifdef CONFIG_UT_OPTEE
"ut optee [test-name]\n"
#endif