cyclic: Add a simple test
[platform/kernel/u-boot.git] / test / test-main.c
index 4f1c54b..ae34002 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <console.h>
+#include <cyclic.h>
 #include <dm.h>
 #include <event.h>
 #include <dm/root.h>
@@ -220,6 +221,7 @@ static int dm_test_restore(struct device_node *of_root)
 static int test_pre_run(struct unit_test_state *uts, struct unit_test *test)
 {
        ut_assertok(event_init());
+       ut_assertok(cyclic_init());
 
        if (test->flags & UT_TESTF_DM)
                ut_assertok(dm_test_pre_run(uts));
@@ -265,6 +267,7 @@ static int test_post_run(struct unit_test_state *uts, struct unit_test *test)
        ut_unsilence_console(uts);
        if (test->flags & UT_TESTF_DM)
                ut_assertok(dm_test_post_run(uts));
+       ut_assertok(cyclic_uninit());
        ut_assertok(event_uninit());
 
        return 0;