mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
test: Handle driver model reinit in test_pre_run()
For driver model tests we want to reinit the data structures so that everything is in a known state before the test runs. This avoids one test changing something that breaks a subsequent tests. Move the call for this into test_pre_run(). Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
47ec3ede4e
commit
72b524cf42
4 changed files with 18 additions and 3 deletions
|
@ -30,6 +30,9 @@ static int do_autoprobe(struct unit_test_state *uts)
|
|||
|
||||
int test_pre_run(struct unit_test_state *uts, struct unit_test *test)
|
||||
{
|
||||
if (test->flags & UT_TESTF_DM)
|
||||
ut_assertok(dm_test_init(uts));
|
||||
|
||||
ut_set_skip_delays(uts, false);
|
||||
|
||||
uts->start = mallinfo();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue