summaryrefslogtreecommitdiff
path: root/test/dm/rtc.c
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2015-05-20 14:27:27 -0500
committerTom Rini <trini@konsulko.com>2015-05-21 09:16:16 -0400
commite721b882e9daf3ad3599eef5a9ccf3847b694228 (patch)
treed92fadcb65548e6ed19c60d4dfa27ecc80c3778c /test/dm/rtc.c
parent6e0d26c0502e4d697cb235069aef188f8f1407d3 (diff)
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>
Diffstat (limited to 'test/dm/rtc.c')
-rw-r--r--test/dm/rtc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/dm/rtc.c b/test/dm/rtc.c
index 9397cf72a7..4345708a3d 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 @@ static int cmp_times(struct rtc_time *expect, struct rtc_time *time, bool show)
}
/* 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 @@ static int dm_test_rtc_set_get(struct dm_test_state *dms)
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 @@ static int dm_test_rtc_reset(struct dm_test_state *dms)
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;