From d4a1592a9908f4278f306ff9f11e63c010e05704 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 25 Mar 2021 10:44:33 +1300 Subject: 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 Reported-by: Sean Anderson Fixes: c79705ea938 ("test: Move dm_test_init() into test-main.c") Tested-by: Sean Anderson --- include/test/test.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/test/test.h b/include/test/test.h index 0b124edd601..bf7d785d8ed 100644 --- a/include/test/test.h +++ b/include/test/test.h @@ -124,4 +124,13 @@ enum { */ struct udevice *testbus_get_clear_removed(void); +static inline void arch_reset_for_test(void) +{ +#ifdef CONFIG_SANDBOX +#include + + state_reset_for_test(state_get_current()); +#endif +} + #endif /* __TEST_TEST_H */ -- cgit v1.3.1