scripts: ci: check_compliance: Remove HWMv1 dead code

HWMv1-specific Kconfig checks were meant to be removed before HWMv2 was
merged into `main` (see `collab-hwm` history), but some traces remained.
Do another round of cleanup.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
This commit is contained in:
Grzegorz Swiderski 2025-01-13 08:31:40 +01:00 committed by Benjamin Cabé
commit c0d5e853a1

View file

@ -469,32 +469,6 @@ class KconfigCheck(ComplianceTest):
except subprocess.CalledProcessError as ex: except subprocess.CalledProcessError as ex:
self.error(ex.output.decode("utf-8")) self.error(ex.output.decode("utf-8"))
def get_v1_model_syms(self, kconfig_v1_file, kconfig_v1_syms_file):
"""
Generate a symbol define Kconfig file.
This function creates a file with all Kconfig symbol definitions from
old boards model so that those symbols will not appear as undefined
symbols in hardware model v2.
This is needed to complete Kconfig compliance tests.
"""
os.environ['HWM_SCHEME'] = 'v1'
# 'kconfiglib' is global
# pylint: disable=undefined-variable
try:
kconf_v1 = kconfiglib.Kconfig(filename=kconfig_v1_file, warn=False)
except kconfiglib.KconfigError as e:
self.failure(str(e))
raise EndTest
with open(kconfig_v1_syms_file, 'w') as fp_kconfig_v1_syms_file:
for s in kconf_v1.defined_syms:
if s.type != kconfiglib.UNKNOWN:
fp_kconfig_v1_syms_file.write('config ' + s.name)
fp_kconfig_v1_syms_file.write('\n\t' + kconfiglib.TYPE_TO_STR[s.type])
fp_kconfig_v1_syms_file.write('\n\n')
def get_v2_model(self, kconfig_dir, settings_file): def get_v2_model(self, kconfig_dir, settings_file):
""" """
Get lists of v2 boards and SoCs and put them in a file that is parsed by Get lists of v2 boards and SoCs and put them in a file that is parsed by
@ -537,9 +511,6 @@ class KconfigCheck(ComplianceTest):
) )
with open(kconfig_file, 'w') as fp: with open(kconfig_file, 'w') as fp:
fp.write(
'osource "' + (Path(kconfig_dir) / 'boards' / 'Kconfig.syms.v1').as_posix() + '"\n'
)
for board in v2_boards: for board in v2_boards:
for board_dir in board.directories: for board_dir in board.directories:
fp.write('osource "' + (board_dir / 'Kconfig').as_posix() + '"\n') fp.write('osource "' + (board_dir / 'Kconfig').as_posix() + '"\n')