summaryrefslogtreecommitdiff
path: root/testsuite.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-03-23 03:37:49 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2018-03-23 19:10:08 +0100
commit7ba79cafa8e03af90dea0c4378e024d24a7d64b7 (patch)
tree1b8072a3fc00259093d3ae6ddd8bfe192a4663c8 /testsuite.py
parentd898552d86ef6deb22284ac0ebafe771e8e0fdc2 (diff)
Warn if user (.config) value is outside of 'range'
Example warning: warning: user value 0x100 on the hex symbol HEX (defined at Kconfig:18) ignored due to being outside the active range ([0x13, 0x73]) -- falling back on defaults This is a Kconfiglib-exclusive warning. It might be tricky to implement in the C tools, due to weird two-phase handling of int/hex symbols. There is unfortunately no easy way to map the warning back to a .config line, as the active 'range' can't be known in general until the entire configuration has been read (consider 'range 0 10 if FOO' for example). Instead, the warning is generated when the symbol value is calculated.
Diffstat (limited to 'testsuite.py')
-rw-r--r--testsuite.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/testsuite.py b/testsuite.py
index c66f42c..110e6ec 100644
--- a/testsuite.py
+++ b/testsuite.py
@@ -1131,6 +1131,9 @@ g
# User values and dependent ranges
+ # Avoid warnings for assigning values outside the active range
+ c.disable_warnings()
+
def verify_range(sym_name, low, high, default):
"""
Tests that the values in the range 'low'-'high' can be assigned, and
@@ -1200,6 +1203,8 @@ g
verify_value("INACTIVE_RANGE", "2")
verify_value("ACTIVE_RANGE", "1")
+ c.enable_warnings()
+
print("Testing defconfig_filename")