test: Generalize the unit test framework

Separate the ability to define tests and assert status of test functions
from the dm tests so they can be used more consistently throughout all
tests.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/test/dm/rtc.c b/test/dm/rtc.c
index 9397cf7..4345708 100644
--- a/test/dm/rtc.c
+++ b/test/dm/rtc.c
@@ -9,12 +9,12 @@
 #include <dm.h>
 #include <rtc.h>
 #include <asm/io.h>
-#include <dm/test.h>
-#include <dm/ut.h>
 #include <asm/test.h>
+#include <dm/test.h>
+#include <test/ut.h>
 
 /* Simple RTC sanity check */
-static int dm_test_rtc_base(struct dm_test_state *dms)
+static int dm_test_rtc_base(struct unit_test_state *uts)
 {
 	struct udevice *dev;
 
@@ -52,7 +52,7 @@
 }
 
 /* Set and get the time */
-static int dm_test_rtc_set_get(struct dm_test_state *dms)
+static int dm_test_rtc_set_get(struct unit_test_state *uts)
 {
 	struct rtc_time now, time, cmp;
 	struct udevice *dev, *emul;
@@ -117,7 +117,7 @@
 DM_TEST(dm_test_rtc_set_get, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
 
 /* Reset the time */
-static int dm_test_rtc_reset(struct dm_test_state *dms)
+static int dm_test_rtc_reset(struct unit_test_state *uts)
 {
 	struct rtc_time now;
 	struct udevice *dev, *emul;
@@ -143,7 +143,7 @@
 DM_TEST(dm_test_rtc_reset, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
 
 /* Check that two RTC devices can be used independently */
-static int dm_test_rtc_dual(struct dm_test_state *dms)
+static int dm_test_rtc_dual(struct unit_test_state *uts)
 {
 	struct rtc_time now1, now2, cmp;
 	struct udevice *dev1, *dev2;