summaryrefslogtreecommitdiff
path: root/cmd/log.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-12-04 13:48:27 -0700
committerTom Rini <trini@konsulko.com>2017-12-07 15:17:00 -0500
commitef11ed8239bf02b347e7fb9fc6d980aec0c7810a (patch)
treea4416fad19e06ea6d1a10a7324fe395bf8dfd61d /cmd/log.c
parentd5f61f272d5b7b86bf6321512ba6326c7c075e72 (diff)
log: Add a test command
Add a command which exercises the logging system. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd/log.c')
-rw-r--r--cmd/log.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/log.c b/cmd/log.c
index 44e04ab16a..abc523b497 100644
--- a/cmd/log.c
+++ b/cmd/log.c
@@ -23,6 +23,9 @@ static int do_log_level(cmd_tbl_t *cmdtp, int flag, int argc,
static cmd_tbl_t log_sub[] = {
U_BOOT_CMD_MKENT(level, CONFIG_SYS_MAXARGS, 1, do_log_level, "", ""),
+#ifdef CONFIG_LOG_TEST
+ U_BOOT_CMD_MKENT(test, 2, 1, do_log_test, "", ""),
+#endif
};
static int do_log(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
@@ -46,6 +49,9 @@ static int do_log(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#ifdef CONFIG_SYS_LONGHELP
static char log_help_text[] =
"level - get/set log level\n"
+#ifdef CONFIG_LOG_TEST
+ "log test - run log tests\n"
+#endif
;
#endif