From 4fce6c53e1bdac803c77f0be8bedece22d73c30c Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Tue, 19 Sep 2017 07:06:17 +0200 Subject: Include 'if' deps. in _determine_actual_symbols() Previously, only WEIRD_1 and not WEIRD_2 would be considered not a choice symbol in the following fragment. This lead to a weird warning in U-Boot. choice config FOO config WEIRD_1 depends on FOO if FOO config WEIRD_2 endif endchoice Also add some testcases for weird choice symbols. --- tests/Kchoice | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tests/Kchoice') diff --git a/tests/Kchoice b/tests/Kchoice index 481e438..1e841ca 100644 --- a/tests/Kchoice +++ b/tests/Kchoice @@ -111,3 +111,27 @@ config MMT_4 config MMT_5 bool endchoice + +# Choice with symbols that shouldn't be considered choice symbols because they +# depend on the preceding symbol. This might be a kconfig bug, but some things +# use it, so we need to emulate it. + +choice WEIRD_SYMS + bool "weird symbols that aren't considered part of the choice" + +# Only WS1 is part of the choice +config WS1 +config WS2 + depends on WS1 +config WS3 + depends on WS2 +config WS4 + depends on WS1 + +# 'if' has the same effect, so only WS5 is part of the choice +config WS5 +if WS5 +config WS6 +endif + +endchoice -- cgit v1.2.3