forked from espressif/esp-idf
Merge branch 'ci/check_missing_runner_only_when_needed' into 'master'
ci: check missing runners only when needed See merge request espressif/esp-idf!30103
This commit is contained in:
@@ -264,7 +264,6 @@ generate_build_child_pipeline:
|
|||||||
dependencies: # set dependencies to null to avoid missing artifacts issue
|
dependencies: # set dependencies to null to avoid missing artifacts issue
|
||||||
needs:
|
needs:
|
||||||
- pipeline_variables
|
- pipeline_variables
|
||||||
- check_test_cases_env_markers_and_required_runners
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- build_child_pipeline.yml
|
- build_child_pipeline.yml
|
||||||
|
@@ -166,10 +166,3 @@ pipeline_variables:
|
|||||||
- pipeline.env
|
- pipeline.env
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
when: always
|
when: always
|
||||||
|
|
||||||
check_test_cases_env_markers_and_required_runners:
|
|
||||||
extends:
|
|
||||||
- .pre_check_template
|
|
||||||
tags: [fast_run, shiny]
|
|
||||||
script:
|
|
||||||
- python tools/ci/dynamic_pipelines/scripts/generate_target_test_child_pipeline.py --check
|
|
||||||
|
@@ -28,9 +28,7 @@ from dynamic_pipelines.utils import dump_jobs_to_yaml
|
|||||||
from gitlab.v4.objects import Project
|
from gitlab.v4.objects import Project
|
||||||
from gitlab_api import Gitlab
|
from gitlab_api import Gitlab
|
||||||
from idf_build_apps import App
|
from idf_build_apps import App
|
||||||
from idf_build_apps.constants import BuildStatus
|
|
||||||
from idf_ci.app import import_apps_from_txt
|
from idf_ci.app import import_apps_from_txt
|
||||||
from idf_pytest.script import get_all_apps
|
|
||||||
from idf_pytest.script import get_pytest_cases
|
from idf_pytest.script import get_pytest_cases
|
||||||
|
|
||||||
|
|
||||||
@@ -187,13 +185,6 @@ if __name__ == '__main__':
|
|||||||
default=DEFAULT_TARGET_TEST_CHILD_PIPELINE_FILEPATH,
|
default=DEFAULT_TARGET_TEST_CHILD_PIPELINE_FILEPATH,
|
||||||
help='Output child pipeline file path',
|
help='Output child pipeline file path',
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
|
||||||
'--check',
|
|
||||||
action='store_true',
|
|
||||||
help='Check if the child pipeline could be generated successfully. '
|
|
||||||
'test cases without env marker or required unset runner will be printed out. '
|
|
||||||
'(Note: All apps and test cases will be checked)',
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--app-info-filepattern',
|
'--app-info-filepattern',
|
||||||
default='list_job_*.txt',
|
default='list_job_*.txt',
|
||||||
@@ -206,14 +197,9 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
gl_project = Gitlab(args.project_id).project
|
gl_project = Gitlab(args.project_id).project
|
||||||
|
|
||||||
if args.check:
|
apps = []
|
||||||
apps = list(get_all_apps(args.paths)[0]) # test related apps only
|
for f in glob.glob(args.app_info_filepattern):
|
||||||
for app in apps:
|
apps.extend(import_apps_from_txt(f))
|
||||||
app.build_status = BuildStatus.SUCCESS # pretend they are built successfully
|
|
||||||
else:
|
|
||||||
apps = []
|
|
||||||
for f in glob.glob(args.app_info_filepattern):
|
|
||||||
apps.extend(import_apps_from_txt(f))
|
|
||||||
|
|
||||||
generate_target_test_child_pipeline(
|
generate_target_test_child_pipeline(
|
||||||
gl_project,
|
gl_project,
|
||||||
|
Reference in New Issue
Block a user