summaryrefslogtreecommitdiff
path: root/test/dm/test-uclass.c
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2015-05-20 19:27:27 (GMT)
committerTom Rini <trini@konsulko.com>2015-05-21 13:16:16 (GMT)
commite721b882e9daf3ad3599eef5a9ccf3847b694228 (patch)
treed92fadcb65548e6ed19c60d4dfa27ecc80c3778c /test/dm/test-uclass.c
parent6e0d26c0502e4d697cb235069aef188f8f1407d3 (diff)
downloadu-boot-e721b882e9daf3ad3599eef5a9ccf3847b694228.tar.xz
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/test-uclass.c')
-rw-r--r--test/dm/test-uclass.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/dm/test-uclass.c b/test/dm/test-uclass.c
index 4ae75ef..4a543bb 100644
--- a/test/dm/test-uclass.c
+++ b/test/dm/test-uclass.c
@@ -11,12 +11,12 @@
#include <malloc.h>
#include <dm.h>
#include <errno.h>
-#include <dm/test.h>
-#include <dm/ut.h>
#include <asm/io.h>
+#include <dm/test.h>
#include <linux/list.h>
+#include <test/ut.h>
-static struct dm_test_state *dms = &global_test_state;
+static struct unit_test_state *uts = &global_dm_test_state;
int test_ping(struct udevice *dev, int pingval, int *pingret)
{
@@ -70,6 +70,7 @@ static int test_post_probe(struct udevice *dev)
struct dm_test_uclass_perdev_priv *priv = dev_get_uclass_priv(dev);
struct uclass *uc = dev->uclass;
+ struct dm_test_state *dms = uts->priv;
dm_testdrv_op_count[DM_TEST_OP_POST_PROBE]++;
ut_assert(priv);