mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 08:04:33 +02:00
ci: Add extra_default_build_targets logic to check_build_test_rules.py
This commit is contained in:
@@ -209,8 +209,10 @@ def check_test_scripts(
|
|||||||
paths: List[str],
|
paths: List[str],
|
||||||
exclude_dirs: Optional[List[str]] = None,
|
exclude_dirs: Optional[List[str]] = None,
|
||||||
bypass_check_test_targets: Optional[List[str]] = None,
|
bypass_check_test_targets: Optional[List[str]] = None,
|
||||||
|
extra_default_build_targets: Optional[List[str]] = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
from idf_build_apps import App, find_apps
|
from idf_build_apps import App, find_apps
|
||||||
|
from idf_build_apps.constants import SUPPORTED_TARGETS
|
||||||
|
|
||||||
# takes long time, run only in CI
|
# takes long time, run only in CI
|
||||||
# dict:
|
# dict:
|
||||||
@@ -323,6 +325,7 @@ def check_test_scripts(
|
|||||||
manifest_files=[
|
manifest_files=[
|
||||||
str(p) for p in Path(IDF_PATH).glob('**/.build-test-rules.yml')
|
str(p) for p in Path(IDF_PATH).glob('**/.build-test-rules.yml')
|
||||||
],
|
],
|
||||||
|
default_build_targets=SUPPORTED_TARGETS + extra_default_build_targets,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
exit_code = 0
|
exit_code = 0
|
||||||
@@ -467,17 +470,17 @@ if __name__ == '__main__':
|
|||||||
else:
|
else:
|
||||||
_exclude_dirs = []
|
_exclude_dirs = []
|
||||||
|
|
||||||
extra_default_build_targets: List[str] = []
|
extra_default_build_targets_list: List[str] = []
|
||||||
bypass_check_test_targets: List[str] = []
|
bypass_check_test_targets_list: List[str] = []
|
||||||
if arg.config:
|
if arg.config:
|
||||||
with open(arg.config) as fr:
|
with open(arg.config) as fr:
|
||||||
configs = yaml.safe_load(fr)
|
configs = yaml.safe_load(fr)
|
||||||
|
|
||||||
if configs:
|
if configs:
|
||||||
extra_default_build_targets = (
|
extra_default_build_targets_list = (
|
||||||
configs.get('extra_default_build_targets') or []
|
configs.get('extra_default_build_targets') or []
|
||||||
)
|
)
|
||||||
bypass_check_test_targets = (
|
bypass_check_test_targets_list = (
|
||||||
configs.get('bypass_check_test_targets') or []
|
configs.get('bypass_check_test_targets') or []
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -485,11 +488,12 @@ if __name__ == '__main__':
|
|||||||
check_readme(
|
check_readme(
|
||||||
list(check_dirs),
|
list(check_dirs),
|
||||||
exclude_dirs=_exclude_dirs,
|
exclude_dirs=_exclude_dirs,
|
||||||
extra_default_build_targets=extra_default_build_targets,
|
extra_default_build_targets=extra_default_build_targets_list,
|
||||||
)
|
)
|
||||||
elif arg.action == 'check-test-scripts':
|
elif arg.action == 'check-test-scripts':
|
||||||
check_test_scripts(
|
check_test_scripts(
|
||||||
list(check_dirs),
|
list(check_dirs),
|
||||||
exclude_dirs=_exclude_dirs,
|
exclude_dirs=_exclude_dirs,
|
||||||
bypass_check_test_targets=bypass_check_test_targets,
|
bypass_check_test_targets=bypass_check_test_targets_list,
|
||||||
|
extra_default_build_targets=extra_default_build_targets_list,
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user