mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #18192 from leandrolanzieri/pr/dist/tools/kconfiglib/add_evaluate_config
dist/tools/kconfiglib: add configuration evaluation function
This commit is contained in:
commit
22977ea01d
4
dist/tools/kconfiglib/genconfig.py
vendored
4
dist/tools/kconfiglib/genconfig.py
vendored
@ -393,9 +393,7 @@ with error.""")
|
||||
kconf = RiotKconfig(args.kconfig_filename, warn_to_stderr=False)
|
||||
merge_configs(kconf, args.config_sources)
|
||||
|
||||
# HACK: Force all symbols to be evaluated, to catch warnings generated
|
||||
# during evaluation (such as out-of-range integers)
|
||||
kconf.write_config(os.devnull, save_old=False)
|
||||
kconf.evaluate_config()
|
||||
|
||||
if not check_configs(kconf) and not args.ignore_config_errors:
|
||||
sys.exit(1)
|
||||
|
8
dist/tools/kconfiglib/riot_kconfig.py
vendored
8
dist/tools/kconfiglib/riot_kconfig.py
vendored
@ -28,6 +28,14 @@ class RiotKconfig(Kconfig):
|
||||
super(RiotKconfig, self).write_autoconf(filename, header)
|
||||
self.unique_defined_syms = tmp_unique_defined_syms
|
||||
|
||||
def evaluate_config(self):
|
||||
"""Evaluate the current configuration.
|
||||
|
||||
Useful to catch warnings (such as out-of-range integers) before writing
|
||||
the configuration to a file.
|
||||
"""
|
||||
self._config_contents(None)
|
||||
|
||||
|
||||
def standard_riot_kconfig(description=None):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user