3 * Joe Hershberger, National Instruments, joe.hershberger@ni.com
5 * SPDX-License-Identifier: GPL-2.0
10 #include <test/suites.h>
12 static int do_ut_all(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
14 static cmd_tbl_t cmd_ut_sub[] = {
15 U_BOOT_CMD_MKENT(all, CONFIG_SYS_MAXARGS, 1, do_ut_all, "", ""),
18 static int do_ut_all(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
24 for (i = 1; i < ARRAY_SIZE(cmd_ut_sub); i++) {
25 printf("----Running %s tests----\n", cmd_ut_sub[i].name);
26 retval = cmd_ut_sub[i].cmd(cmdtp, flag, 1, &cmd_ut_sub[i].name);
34 static int do_ut(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
41 /* drop initial "ut" arg */
45 cp = find_cmd_tbl(argv[0], cmd_ut_sub, ARRAY_SIZE(cmd_ut_sub));
48 return cp->cmd(cmdtp, flag, argc, argv);
53 #ifdef CONFIG_SYS_LONGHELP
54 static char ut_help_text[] =
55 "all - execute all enabled tests\n"
60 ut, CONFIG_SYS_MAXARGS, 1, do_ut,
61 "unit tests", ut_help_text