From: Heinrich Schuchardt <xypron.glpk@gmx.de>
Date: Wed, 26 Feb 2020 20:48:15 +0000 (+0100)
Subject: log: correct CONFIG_LOG_TEST prerequisites
X-Git-Tag: v2025.01-rc5-pxa1908~2478^2~20
X-Git-Url: http://git.dujemihanovic.xyz/%22http:/www.sics.se/static/html/%7B%7B%20%28.OutputFormats.Get?a=commitdiff_plain;h=d1a02f53b3f24dfce488ba244ba4f8809bebe596;p=u-boot.git

log: correct CONFIG_LOG_TEST prerequisites

An error

	undefined reference to `do_log_test'

occurs for CONFIG_CMD_LOG=y, CONFIG_LOG_TEST=y, CONGIG_UNIT_TEST=n

Make CONFIG_UNIT_TEST a prerequisite.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
---

diff --git a/common/Kconfig b/common/Kconfig
index 3072651082..40da8fa7a3 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -777,7 +777,7 @@ config TPL_LOG_CONSOLE
 
 config LOG_TEST
 	bool "Provide a test for logging"
-	depends on LOG
+	depends on LOG && UNIT_TEST
 	default y if SANDBOX
 	help
 	  This enables a 'log test' command to test logging. It is normally