X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=test%2Fdm%2Ftest-main.c;h=a47bb370223ca6d805ddae4db643e4a17b89b673;hb=bc0571fc1067ff8a8fd16990ae65c1a2826ea90c;hp=828ed46f8e79ec9205890f20c40a1c7d7935ffd7;hpb=32907339c2f533f1d59362c6100c6a0eeeca4837;p=u-boot diff --git a/test/dm/test-main.c b/test/dm/test-main.c index 828ed46f8e..a47bb37022 100644 --- a/test/dm/test-main.c +++ b/test/dm/test-main.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -32,7 +33,7 @@ static int dm_test_init(struct dm_test_state *dms) /* Ensure all the test devices are probed */ static int do_autoprobe(struct dm_test_state *dms) { - struct device *dev; + struct udevice *dev; int ret; /* Scanning the uclass is enough to probe all the devices */ @@ -64,7 +65,7 @@ static int dm_test_destroy(struct dm_test_state *dms) 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); @@ -82,18 +83,22 @@ int dm_test_main(void) 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()); + ut_assertok(dm_scan_platdata(false)); if (test->flags & DM_TESTF_PROBE_TEST) ut_assertok(do_autoprobe(dms)); if (test->flags & DM_TESTF_SCAN_FDT) - ut_assertok(dm_scan_fdt(gd->fdt_blob)); + ut_assertok(dm_scan_fdt(gd->fdt_blob, false)); if (test->func(dms)) break;