summaryrefslogtreecommitdiff
path: root/kconfiglib.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2017-11-03 03:17:58 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2017-11-03 03:24:56 +0100
commitb59b618a0ce85632742ff92a5be2bab690a75e42 (patch)
tree7f6c737c88e660633193ee79376cab249e5aa85b /kconfiglib.py
parentb3d65345e010628a100f6a9f0b0817b0bd462543 (diff)
Add initial selftests for .assignable
Comprehensive selftests are important here, because the allno/yesconfig.py scripts only check the upper and lower bound, and allnoconfig disables modules. Found a bug for non-selected m-visible tristates, where n didn't show up in sym.assignable. Everything matches menuconfig after fixing that. Still need to test symbols in choices with different modes, imply, and .assignable for choices.
Diffstat (limited to 'kconfiglib.py')
-rw-r--r--kconfiglib.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index 8bb8957..612fc58 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -2726,8 +2726,10 @@ class Symbol(object):
# vis == 1
+ # Must be a tristate here, because bool m visibility gets promoted to y
+
if not rev_dep_val:
- return (1,) if expr_value(self.weak_rev_dep) != 2 else (2,)
+ return (0, 1) if expr_value(self.weak_rev_dep) != 2 else (0, 2)
if rev_dep_val == 2:
return (2,)