aboutsummaryrefslogtreecommitdiff
path: root/arch/sandbox
diff options
context:
space:
mode:
authorHeinrich Schuchardt2023-10-03 02:59:46 +0200
committerSimon Glass2023-10-13 10:15:41 -0700
commit3cce6fcea714a089df2221128210a8fa9bb4f0fd (patch)
tree09769bdcf5e4e41bc7a8b5cbb80f7334d6b24887 /arch/sandbox
parente824d0d0c219bc6da767f13f90c5b00eefe929f0 (diff)
sandbox: fix spl_board_init
sandbox_spl_defconfig with CONFIG_SPL_UNIT_TEST=n fails to build. in function `spl_board_init': arch/sandbox/cpu/spl.c:134:(.text.spl_board_init+0x4a): undefined reference to `ut_run_list' Add the missing configuration check. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox')
-rw-r--r--arch/sandbox/cpu/spl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c
index 09e3d10d6a5..7590f1b80a6 100644
--- a/arch/sandbox/cpu/spl.c
+++ b/arch/sandbox/cpu/spl.c
@@ -126,6 +126,9 @@ void spl_board_init(void)
{
struct sandbox_state *state = state_get_current();
+ if (!CONFIG_IS_ENABLED(UNIT_TEST))
+ return;
+
if (state->run_unittests) {
struct unit_test *tests = UNIT_TEST_ALL_START();
const int count = UNIT_TEST_ALL_COUNT();