diff options
author | Simon Glass <sjg@chromium.org> | 2021-03-25 00:44:33 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-04-06 07:33:19 +0300 |
commit | d4a1592a9908f4278f306ff9f11e63c010e05704 (patch) | |
tree | b5770c45b4a23e926a082983563829e6b4f9df70 /test | |
parent | 4c30d18ed38c5ae84ed91da0f9d1ba4c9e83bffc (diff) | |
download | u-boot-d4a1592a9908f4278f306ff9f11e63c010e05704.tar.xz |
test: Allow tests to run on any board
Due to a recent change, tests are limited to running on sandbox only.
Correct this so that any architecture can run them.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Sean Anderson <seanga2@gmail.com>
Fixes: c79705ea938 ("test: Move dm_test_init() into test-main.c")
Tested-by: Sean Anderson <seanga2@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/test-main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/test-main.c b/test/test-main.c index 46a0c2ee2f..8c852d72f4 100644 --- a/test/test-main.c +++ b/test/test-main.c @@ -7,7 +7,6 @@ #include <common.h> #include <console.h> #include <dm.h> -#include <asm/state.h> #include <dm/root.h> #include <dm/test.h> #include <dm/uclass-internal.h> @@ -46,9 +45,9 @@ static int dm_test_pre_run(struct unit_test_state *uts) uts->force_fail_alloc = false; uts->skip_post_probe = false; gd->dm_root = NULL; - if (!CONFIG_IS_ENABLED(OF_PLATDATA)) + if (IS_ENABLED(CONFIG_UT_DM) && !CONFIG_IS_ENABLED(OF_PLATDATA)) memset(dm_testdrv_op_count, '\0', sizeof(dm_testdrv_op_count)); - state_reset_for_test(state_get_current()); + arch_reset_for_test(); /* Determine whether to make the live tree available */ gd_set_of_root(of_live ? uts->of_root : NULL); |