Skip to content

Commit e5eef06

Browse files
Grzegorz SwiderskiChromeos LUCI
authored andcommitted
scripts: ci: check_compliance: Inline creation of HWMv2 temp dirs
The KCONFIG_BINARY_DIR/{boards,soc,arch}/ directories are only relevant for `KconfigCheck.get_v2_model()`, so generate them within this method. (cherry picked from commit 37bce60) Original-Signed-off-by: Grzegorz Swiderski <[email protected]> GitOrigin-RevId: 37bce60 Cr-Build-Id: 8725452993329915921 Cr-Build-Url: https://cr-buildbucket.appspot.com/build/8725452993329915921 Copybot-Job-Name: zephyr-main-copybot-downstream Change-Id: Ia5ef175140c59201a67cd4a62c3724dd01a3bb37 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/6183330 Tested-by: ChromeOS Prod (Robot) <[email protected]> Reviewed-by: Jonathon Murphy <[email protected]> Commit-Queue: Jonathon Murphy <[email protected]>
1 parent 1d65a23 commit e5eef06

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

scripts/ci/check_compliance.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,12 @@ def get_v2_model(self, kconfig_dir, settings_file):
477477
This is needed to complete Kconfig sanity tests.
478478
"""
479479
os.environ['HWM_SCHEME'] = 'v2'
480+
os.environ["KCONFIG_BOARD_DIR"] = os.path.join(kconfig_dir, 'boards')
481+
482+
os.makedirs(os.path.join(kconfig_dir, 'boards'), exist_ok=True)
483+
os.makedirs(os.path.join(kconfig_dir, 'soc'), exist_ok=True)
484+
os.makedirs(os.path.join(kconfig_dir, 'arch'), exist_ok=True)
485+
480486
kconfig_file = os.path.join(kconfig_dir, 'boards', 'Kconfig')
481487
kconfig_boards_file = os.path.join(kconfig_dir, 'boards', 'Kconfig.boards')
482488
kconfig_defconfig_file = os.path.join(kconfig_dir, 'boards', 'Kconfig.defconfig')
@@ -585,14 +591,7 @@ def parse_kconfig(self):
585591
# For Kconfig.dts support
586592
self.get_kconfig_dts(os.path.join(kconfiglib_dir, "Kconfig.dts"),
587593
os.path.join(kconfiglib_dir, "settings_file.txt"))
588-
589-
# To make compliance work with old hw model and HWMv2 simultaneously.
590-
kconfiglib_boards_dir = os.path.join(kconfiglib_dir, 'boards')
591-
os.makedirs(kconfiglib_boards_dir, exist_ok=True)
592-
os.makedirs(os.path.join(kconfiglib_dir, 'soc'), exist_ok=True)
593-
os.makedirs(os.path.join(kconfiglib_dir, 'arch'), exist_ok=True)
594-
595-
os.environ["KCONFIG_BOARD_DIR"] = kconfiglib_boards_dir
594+
# For hardware model support (board, soc, arch)
596595
self.get_v2_model(kconfiglib_dir, os.path.join(kconfiglib_dir, "settings_file.txt"))
597596

598597
# Tells Kconfiglib to generate warnings for all references to undefined

0 commit comments

Comments
 (0)