[PATCH v3 1/2] sandbox: log: Avoid build error with !CONFIG_LOG
Simon Glass
sjg at chromium.org
Sat May 8 17:30:42 CEST 2021
The pr_cont_test.c test requires CONFIG_LOG since it directly accesses
fields in global_data that require it. Move the test into the CONFIG_LOG
condition to avoid build errors.
Enable CONFIG_LOG on sandbox (not sandbox_spl, etc.) so that we still run
this test. This requires resyncing of the configs.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
(no changes since v1)
configs/sandbox_defconfig | 1 +
test/log/Makefile | 1 +
2 files changed, 2 insertions(+)
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index bdbf714e2bd..60cdad10848 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -21,6 +21,7 @@ CONFIG_BOOTSTAGE_STASH_SIZE=0x4096
CONFIG_CONSOLE_RECORD=y
CONFIG_CONSOLE_RECORD_OUT_SIZE=0x1000
CONFIG_PRE_CONSOLE_BUFFER=y
+CONFIG_LOG=y
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_MISC_INIT_F=y
CONFIG_STACKPROTECTOR=y
diff --git a/test/log/Makefile b/test/log/Makefile
index a3dedace043..09f8689d070 100644
--- a/test/log/Makefile
+++ b/test/log/Makefile
@@ -17,6 +17,7 @@ endif
ifdef CONFIG_LOG
obj-y += pr_cont_test.o
obj-$(CONFIG_CONSOLE_RECORD) += cont_test.o
+obj-y += pr_cont_test.o
else
obj-$(CONFIG_CONSOLE_RECORD) += nolog_test.o
endif
--
2.31.1.607.g51e8a6a459-goog
More information about the U-Boot
mailing list