test: dm: Recover the driver model tree after tests
Put the driver model for the system back into a good state after
completing the DM testing.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
diff --git a/test/dm/test-main.c b/test/dm/test-main.c
index 53c3a6e..0477d2f 100644
--- a/test/dm/test-main.c
+++ b/test/dm/test-main.c
@@ -111,6 +111,11 @@
printf("Failures: %d\n", uts->fail_count);
+ gd->dm_root = NULL;
+ ut_assertok(dm_init());
+ dm_scan_platdata(false);
+ dm_scan_fdt(gd->fdt_blob, false);
+
return uts->fail_count ? CMD_RET_FAILURE : 0;
}