[Concept,06/18] buildman: Fix config value change detection
Commit Message
From: Simon Glass <simon.glass@canonical.com>
Config value changes are never detected because tconfig.config.get(key)
looks up the config key in the filename-keyed dict instead of the config
dict for the current file.
Change to tconfig.config[name].get(key) to correctly look up the config
value in the current file's config dict.
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---
tools/buildman/builder.py | 2 +-
tools/buildman/func_test.py | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
@@ -1624,7 +1624,7 @@ class Builder:
config_minus[key] = value
all_config_minus[key] = value
for key, value in base.items():
- new_value = tconfig.config.get(key)
+ new_value = tconfig.config[name].get(key)
if new_value and value != new_value:
desc = f'{value} -> {new_value}'
config_change[key] = desc
@@ -651,8 +651,10 @@ Some images are invalid'''
self.assertEqual(self._make_calls, 0)
lines = terminal.get_print_test_lines()
text = '\n'.join(line.text for line in lines)
- # Check config options appear in the output
- self.assertIn('CONFIG_', text)
+ # Check config options appear in the output - both additions and
+ # value changes should be detected
+ self.assertIn('CONFIG_NEW_OPTION', text) # Addition
+ self.assertIn('CONFIG_VALUE', text) # Value change
self.assertIn('(no errors to report)', lines[-1].text)
def testCount(self):