summaryrefslogtreecommitdiff
path: root/test/cmd_ut.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-07-13 06:06:59 -0600
committerSimon Glass <sjg@chromium.org>2022-07-26 02:30:56 -0600
commit747244840b647991844556284aacdb3857440861 (patch)
treed6f43333ce2926a4acc8b36316eed21ba42938b4 /test/cmd_ut.c
parent281996110c1f42b5476e43040798cb38169b6119 (diff)
fdt: Start a test for the fdt command
Add a basic test of the 'fdt addr' command, to kick things off. This includes a new convenience function to run a command from a printf() string. Signed-off-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 d70b72678ae..3789c6b784c 100644
--- a/test/cmd_ut.c
+++ b/test/cmd_ut.c
@@ -39,6 +39,9 @@ static struct cmd_tbl cmd_ut_sub[] = {
#if defined(CONFIG_UT_ENV)
U_BOOT_CMD_MKENT(env, CONFIG_SYS_MAXARGS, 1, do_ut_env, "", ""),
#endif
+#ifdef CONFIG_CMD_FDT
+ U_BOOT_CMD_MKENT(fdt, CONFIG_SYS_MAXARGS, 1, do_ut_fdt, "", ""),
+#endif
#ifdef CONFIG_UT_OPTEE
U_BOOT_CMD_MKENT(optee, CONFIG_SYS_MAXARGS, 1, do_ut_optee, "", ""),
#endif
@@ -131,6 +134,9 @@ static char ut_help_text[] =
#ifdef CONFIG_UT_ENV
"ut env [test-name]\n"
#endif
+#ifdef CONFIG_CMD_FDT
+ "ut fdt [test-name] - test of the fdt command\n"
+#endif
#ifdef CONFIG_UT_LIB
"ut lib [test-name] - test library functions\n"
#endif