#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <dm/test.h>
#include <dm/root.h>
#include <dm/uclass-internal.h>
return 0;
}
-int dm_test_main(void)
+int dm_test_main(const char *test_name)
{
struct dm_test *tests = ll_entry_start(struct dm_test, dm_test);
const int n_ents = ll_entry_count(struct dm_test, dm_test);
ut_assert(gd->fdt_blob);
}
- printf("Running %d driver model tests\n", n_ents);
+ if (!test_name)
+ printf("Running %d driver model tests\n", n_ents);
for (test = tests; test < tests + n_ents; test++) {
+ if (test_name && strcmp(test_name, test->name))
+ continue;
printf("Test: %s\n", test->name);
ut_assertok(dm_test_init(dms));
+ dms->start = mallinfo();
if (test->flags & DM_TESTF_SCAN_PDATA)
ut_assertok(dm_scan_platdata(false));
if (test->flags & DM_TESTF_PROBE_TEST)