scripts: ci: check_compliance: Account for board & SoC extensions
When a given board or SoC is extended, it has more than one directory associated with it, where the build system can look for Kconfig files. Make sure all of them are also included for Kconfig compliance checks. Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
This commit is contained in:
parent
9bca4921e4
commit
f76c7e3a9a
1 changed files with 9 additions and 6 deletions
|
@ -523,7 +523,8 @@ class KconfigCheck(ComplianceTest):
|
|||
|
||||
with open(kconfig_defconfig_file, 'w') as fp:
|
||||
for board in v2_boards:
|
||||
fp.write('osource "' + (Path(board.dir) / 'Kconfig.defconfig').as_posix() + '"\n')
|
||||
for board_dir in board.directories:
|
||||
fp.write('osource "' + (board_dir / 'Kconfig.defconfig').as_posix() + '"\n')
|
||||
|
||||
with open(kconfig_boards_file, 'w') as fp:
|
||||
for board in v2_boards:
|
||||
|
@ -535,8 +536,9 @@ class KconfigCheck(ComplianceTest):
|
|||
re.sub(r"[^a-zA-Z0-9_]", "_", qualifier)).upper()
|
||||
fp.write('config ' + board_str + '\n')
|
||||
fp.write('\t bool\n')
|
||||
for board_dir in board.directories:
|
||||
fp.write(
|
||||
'source "' + (Path(board.dir) / ('Kconfig.' + board.name)).as_posix() + '"\n\n'
|
||||
'source "' + (board_dir / ('Kconfig.' + board.name)).as_posix() + '"\n'
|
||||
)
|
||||
|
||||
with open(kconfig_file, 'w') as fp:
|
||||
|
@ -544,7 +546,8 @@ class KconfigCheck(ComplianceTest):
|
|||
'osource "' + (Path(kconfig_dir) / 'boards' / 'Kconfig.syms.v1').as_posix() + '"\n'
|
||||
)
|
||||
for board in v2_boards:
|
||||
fp.write('osource "' + (Path(board.dir) / 'Kconfig').as_posix() + '"\n')
|
||||
for board_dir in board.directories:
|
||||
fp.write('osource "' + (board_dir / 'Kconfig').as_posix() + '"\n')
|
||||
|
||||
kconfig_defconfig_file = os.path.join(kconfig_dir, 'soc', 'Kconfig.defconfig')
|
||||
kconfig_soc_file = os.path.join(kconfig_dir, 'soc', 'Kconfig.soc')
|
||||
|
@ -553,7 +556,7 @@ class KconfigCheck(ComplianceTest):
|
|||
root_args = argparse.Namespace(**{'soc_roots': soc_roots})
|
||||
v2_systems = list_hardware.find_v2_systems(root_args)
|
||||
|
||||
soc_folders = {soc.folder[0] for soc in v2_systems.get_socs()}
|
||||
soc_folders = {folder for soc in v2_systems.get_socs() for folder in soc.folder}
|
||||
with open(kconfig_defconfig_file, 'w') as fp:
|
||||
for folder in soc_folders:
|
||||
fp.write('osource "' + (Path(folder) / 'Kconfig.defconfig').as_posix() + '"\n')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue