]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - test/dm/test-main.c
test: dm: Move the dm tests over to the ut command
[people/ms/u-boot.git] / test / dm / test-main.c
index 5e36e7654319c61be4dad5b2a4538c94e9e08762..a2fe1765791191b9cd96281b9dc64962b06711bb 100644 (file)
@@ -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);
+}