Lines Matching full:test

14 #include <dm/test.h>
17 #include <test/ut.h>
44 /* Ensure all the test devices are probed */
77 static int dm_do_test(struct unit_test_state *uts, struct unit_test *test, in dm_do_test() argument
81 const char *fname = strrchr(test->file, '/') + 1; in dm_do_test()
83 printf("Test: %s: %s%s\n", test->name, fname, in dm_do_test()
88 if (test->flags & DM_TESTF_SCAN_PDATA) in dm_do_test()
90 if (test->flags & DM_TESTF_PROBE_TEST) in dm_do_test()
92 if (test->flags & DM_TESTF_SCAN_FDT) in dm_do_test()
102 test->func(uts); in dm_do_test()
112 * dm_test_run_on_flattree() - Check if we should run a test with flat DT
115 * DT test in addition to a live DT test.
117 * @return true to run the given test on the flat device tree
119 static bool dm_test_run_on_flattree(struct unit_test *test) in dm_test_run_on_flattree() argument
121 const char *fname = strrchr(test->file, '/') + 1; in dm_test_run_on_flattree()
123 return !strstr(fname, "video") || strstr(test->name, "video_base"); in dm_test_run_on_flattree()
131 struct unit_test *test; in dm_test_main() local
142 puts("Please run with test device tree:\n" in dm_test_main()
143 " ./u-boot -d arch/sandbox/dts/test.dtb\n"); in dm_test_main()
154 for (test = tests; test < tests + n_ents; test++) { in dm_test_main()
155 const char *name = test->name; in dm_test_main()
167 if (!(test->flags & DM_TESTF_FLAT_TREE)) { in dm_test_main()
168 ut_assertok(dm_do_test(uts, test, true)); in dm_test_main()
175 * or it is a core test. in dm_test_main()
177 if (!(test->flags & DM_TESTF_LIVE_TREE) && in dm_test_main()
178 (!runs || dm_test_run_on_flattree(test))) { in dm_test_main()
179 ut_assertok(dm_do_test(uts, test, false)); in dm_test_main()
186 printf("Test '%s' not found\n", test_name); in dm_test_main()