# Merge with the current annotations
c = KConfig(args.import_file)
a = Annotation(args.file)
- a.update(c, args.arch, args.flavour)
+ a.update(c, arch=args.arch, flavour=args.flavour, config=args.config)
# Save back to annotations
a.save(args.file)
value = c.config[conf] if conf in c.config else '-'
if value != expected:
policy = a.config[conf] if conf in a.config else 'undefined'
+ if 'policy' in policy:
+ policy = f"policy<{policy['policy']}>"
print(f"check-config: FAIL: ({value} != {expected}): {conf} {policy})")
ret = 1
else:
raise Exception(str(e) + f', line = {line}')
return config
- def update(self, c: KConfig, arch: str, flavour: str = None):
+ def update(self, c: KConfig, arch: str, flavour: str = None, config: str = None):
""" Merge configs from a Kconfig object into Annotation object """
- a_configs = self.search_config(arch=arch, flavour=flavour).keys()
- c_configs = c.config.keys()
+ # Determine if we need to import all configs or a single config
+ if config is None:
+ a_configs = self.search_config(arch=arch, flavour=flavour).keys()
+ c_configs = c.config.keys()
+ else:
+ a_configs = c_configs = {config}
# Import configs from the Kconfig object into Annotations
if flavour is not None: