]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
test: Mark all driver model tests with a flag
authorSimon Glass <sjg@chromium.org>
Mon, 8 Mar 2021 00:34:45 +0000 (17:34 -0700)
committerTom Rini <trini@konsulko.com>
Fri, 12 Mar 2021 14:57:29 +0000 (09:57 -0500)
Add a flag for driver model tests, so we can do special processing for
them.

Signed-off-by: Simon Glass <sjg@chromium.org>
include/dm/test.h
include/test/test.h

index 6ac6672cd6f663467d3d88b1731c297ab4db108a..dfbc82c756d001a0d8e3990fa88c03b4c8f59ed2 100644 (file)
@@ -143,7 +143,8 @@ struct dm_test_state {
 };
 
 /* Declare a new driver model test */
-#define DM_TEST(_name, _flags) UNIT_TEST(_name, _flags, dm_test)
+#define DM_TEST(_name, _flags) \
+       UNIT_TEST(_name, UT_TESTF_DM | (_flags), dm_test)
 
 /*
  * struct sandbox_sdl_plat - Platform data for the SDL video driver
index 3fdaa2b5e51780edc8b2aee6bf7501278944616b..27585507d8cfe78d1f6c86ddd1dd3c0d0109ebcf 100644 (file)
@@ -36,6 +36,8 @@ enum {
        UT_TESTF_FLAT_TREE      = BIT(3),       /* test needs flat DT */
        UT_TESTF_LIVE_TREE      = BIT(4),       /* needs live device tree */
        UT_TESTF_CONSOLE_REC    = BIT(5),       /* needs console recording */
+       /* do extra driver model init and uninit */
+       UT_TESTF_DM             = BIT(6),
 };
 
 /**