]> Git Repo - J-u-boot.git/blobdiff - test/cmd_ut.c
test: Rename UTF_CONSOLE_REC to UTF_CONSOLE
[J-u-boot.git] / test / cmd_ut.c
index 0f56409e8031449e49109e29793a24deb0432906..38ba89ee33ebdf50072514deb2fcdd173e35b8d3 100644 (file)
@@ -4,9 +4,9 @@
  * Joe Hershberger, National Instruments, [email protected]
  */
 
-#include <common.h>
 #include <command.h>
 #include <console.h>
+#include <vsprintf.h>
 #include <test/suites.h>
 #include <test/test.h>
 #include <test/ut.h>
@@ -45,7 +45,7 @@ int cmd_ut_category(const char *name, const char *prefix,
        }
 
        ret = ut_run_list(name, prefix, tests, n_ents,
-                         argc > 1 ? argv[1] : NULL, runs_per_text, force_run,
+                         cmd_arg1(argc, argv), runs_per_text, force_run,
                          test_insert);
 
        return ret ? CMD_RET_FAILURE : 0;
@@ -57,9 +57,12 @@ static struct cmd_tbl cmd_ut_sub[] = {
 #ifdef CONFIG_CMD_BDI
        U_BOOT_CMD_MKENT(bdinfo, CONFIG_SYS_MAXARGS, 1, do_ut_bdinfo, "", ""),
 #endif
-#ifdef CONFIG_BOOTSTD
+#ifdef CONFIG_UT_BOOTSTD
        U_BOOT_CMD_MKENT(bootstd, CONFIG_SYS_MAXARGS, 1, do_ut_bootstd,
                         "", ""),
+#endif
+#ifdef CONFIG_CMDLINE
+       U_BOOT_CMD_MKENT(cmd, CONFIG_SYS_MAXARGS, 1, do_ut_cmd, "", ""),
 #endif
        U_BOOT_CMD_MKENT(common, CONFIG_SYS_MAXARGS, 1, do_ut_common, "", ""),
 #if defined(CONFIG_UT_DM)
@@ -86,6 +89,10 @@ static struct cmd_tbl cmd_ut_sub[] = {
 #endif
 #ifdef CONFIG_UT_LOG
        U_BOOT_CMD_MKENT(log, CONFIG_SYS_MAXARGS, 1, do_ut_log, "", ""),
+#endif
+#if defined(CONFIG_SANDBOX) && defined(CONFIG_CMD_MBR) && defined(CONFIG_CMD_MMC) \
+        && defined(CONFIG_MMC_SANDBOX) && defined(CONFIG_MMC_WRITE)
+       U_BOOT_CMD_MKENT(mbr, CONFIG_SYS_MAXARGS, 1, do_ut_mbr, "", ""),
 #endif
        U_BOOT_CMD_MKENT(mem, CONFIG_SYS_MAXARGS, 1, do_ut_mem, "", ""),
 #if defined(CONFIG_SANDBOX) && defined(CONFIG_CMD_SETEXPR)
@@ -99,6 +106,10 @@ static struct cmd_tbl cmd_ut_sub[] = {
 #if CONFIG_IS_ENABLED(UT_UNICODE) && !defined(API_BUILD)
        U_BOOT_CMD_MKENT(unicode, CONFIG_SYS_MAXARGS, 1, do_ut_unicode, "", ""),
 #endif
+#ifdef CONFIG_MEASURED_BOOT
+       U_BOOT_CMD_MKENT(measurement, CONFIG_SYS_MAXARGS, 1, do_ut_measurement,
+                        "", ""),
+#endif
 #ifdef CONFIG_SANDBOX
        U_BOOT_CMD_MKENT(compression, CONFIG_SYS_MAXARGS, 1, do_ut_compression,
                         "", ""),
@@ -110,6 +121,9 @@ static struct cmd_tbl cmd_ut_sub[] = {
 #ifdef CONFIG_CMD_ADDRMAP
        U_BOOT_CMD_MKENT(addrmap, CONFIG_SYS_MAXARGS, 1, do_ut_addrmap, "", ""),
 #endif
+#if CONFIG_IS_ENABLED(HUSH_PARSER)
+       U_BOOT_CMD_MKENT(hush, CONFIG_SYS_MAXARGS, 1, do_ut_hush, "", ""),
+#endif
 #ifdef CONFIG_CMD_LOADM
        U_BOOT_CMD_MKENT(loadm, CONFIG_SYS_MAXARGS, 1, do_ut_loadm, "", ""),
 #endif
@@ -119,6 +133,9 @@ static struct cmd_tbl cmd_ut_sub[] = {
 #ifdef CONFIG_CMD_SEAMA
        U_BOOT_CMD_MKENT(seama, CONFIG_SYS_MAXARGS, 1, do_ut_seama, "", ""),
 #endif
+#ifdef CONFIG_CMD_UPL
+       U_BOOT_CMD_MKENT(upl, CONFIG_SYS_MAXARGS, 1, do_ut_upl, "", ""),
+#endif
 };
 
 static int do_ut_all(struct cmd_tbl *cmdtp, int flag, int argc,
@@ -166,8 +183,7 @@ static int do_ut(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
        return CMD_RET_USAGE;
 }
 
-#ifdef CONFIG_SYS_LONGHELP
-static char ut_help_text[] =
+U_BOOT_LONGHELP(ut,
        "[-r] [-f] [<suite>] - run unit tests\n"
        "   -r<runs>   Number of times to run each test\n"
        "   -f         Force 'manual' tests to run as well\n"
@@ -188,6 +204,9 @@ static char ut_help_text[] =
 #ifdef CONFIG_BOOTSTD
        "\nbootstd - standard boot implementation"
 #endif
+#ifdef CONFIG_CMDLINE
+       "\ncmd - test various commands"
+#endif
 #ifdef CONFIG_SANDBOX
        "\ncompression - compressors and bootm decompression"
 #endif
@@ -203,6 +222,9 @@ static char ut_help_text[] =
 #ifdef CONFIG_CONSOLE_TRUETYPE
        "\nfont - font command"
 #endif
+#if CONFIG_IS_ENABLED(HUSH_PARSER)
+       "\nhush - Test hush behavior"
+#endif
 #ifdef CONFIG_CMD_LOADM
        "\nloadm - loadm command parameters and loading memory blob"
 #endif
@@ -237,8 +259,7 @@ static char ut_help_text[] =
        !defined(CONFIG_SPL_BUILD) && !defined(API_BUILD)
        "\nunicode - Unicode functions"
 #endif
-       ;
-#endif /* CONFIG_SYS_LONGHELP */
+       );
 
 U_BOOT_CMD(
        ut, CONFIG_SYS_MAXARGS, 1, do_ut,
This page took 0.027183 seconds and 4 git commands to generate.