diff options
author | Joe Hershberger <joe.hershberger@ni.com> | 2015-05-20 14:27:29 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-05-21 09:16:17 -0400 |
commit | 40441e0bd34425994c6feb7a3e78fa84b23d7244 (patch) | |
tree | 96874d705e679cb25cc3788e53db6a80dea9bcd6 /test/dm/test-main.c | |
parent | c617ede08ad0583e0e015e76ebda2c5d2f6b5854 (diff) | |
download | u-boot-40441e0bd34425994c6feb7a3e78fa84b23d7244.tar.gz |
test: dm: Move the dm tests over to the ut command
Unify the command for running unit tests further by moving the "dm test"
command over to "ut dm".
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/dm/test-main.c')
-rw-r--r-- | test/dm/test-main.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/dm/test-main.c b/test/dm/test-main.c index 5e36e76543..a2fe176579 100644 --- a/test/dm/test-main.c +++ b/test/dm/test-main.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <command.h> #include <dm.h> #include <errno.h> #include <malloc.h> @@ -70,7 +71,7 @@ static int dm_test_destroy(struct unit_test_state *uts) return 0; } -int dm_test_main(const char *test_name) +static int dm_test_main(const char *test_name) { struct unit_test *tests = ll_entry_start(struct unit_test, dm_test); const int n_ents = ll_entry_count(struct unit_test, dm_test); @@ -115,3 +116,13 @@ int dm_test_main(const char *test_name) return 0; } + +int do_ut_dm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + const char *test_name = NULL; + + if (argc > 1) + test_name = argv[1]; + + return dm_test_main(test_name); +} |