mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'ci/new-known_failure_cases_workflow(v4.4)' into 'release/v4.4'
ci: change known_failure_cases workflow(v4.4) See merge request espressif/esp-idf!27968
This commit is contained in:
commit
c2c7f53b94
@ -68,6 +68,9 @@ variables:
|
|||||||
# target test repo parameters
|
# target test repo parameters
|
||||||
TEST_ENV_CONFIG_REPO: "https://gitlab-ci-token:${BOT_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/qa/ci-test-runner-configs.git"
|
TEST_ENV_CONFIG_REPO: "https://gitlab-ci-token:${BOT_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/qa/ci-test-runner-configs.git"
|
||||||
|
|
||||||
|
# Set this variable to specify the file name for the known failure cases.
|
||||||
|
KNOWN_FAILURE_CASES_FILE_NAME: "4.4.txt"
|
||||||
|
|
||||||
IDF_CI_BUILD: 1
|
IDF_CI_BUILD: 1
|
||||||
|
|
||||||
.setup_tools_unless_target_test: &setup_tools_unless_target_test |
|
.setup_tools_unless_target_test: &setup_tools_unless_target_test |
|
||||||
|
@ -31,10 +31,11 @@
|
|||||||
- retry_failed git clone $TEST_ENV_CONFIG_REPO
|
- retry_failed git clone $TEST_ENV_CONFIG_REPO
|
||||||
- python $CHECKOUT_REF_SCRIPT ci-test-runner-configs ci-test-runner-configs
|
- python $CHECKOUT_REF_SCRIPT ci-test-runner-configs ci-test-runner-configs
|
||||||
# git clone the known failure cases repo, run test
|
# git clone the known failure cases repo, run test
|
||||||
- retry_failed git clone $KNOWN_FAILURE_CASES_REPO known_failure_cases
|
- pip install minio
|
||||||
|
- python tools/ci/get_known_failure_cases_file.py
|
||||||
# run test
|
# run test
|
||||||
- cd tools/ci/python_packages/tiny_test_fw/bin
|
- cd tools/ci/python_packages/tiny_test_fw/bin
|
||||||
- run_cmd python Runner.py $TEST_CASE_PATH -c $CONFIG_FILE -e $ENV_FILE --known_failure_cases_file $CI_PROJECT_DIR/known_failure_cases/known_failure_cases.txt
|
- run_cmd python Runner.py $TEST_CASE_PATH -c $CONFIG_FILE -e $ENV_FILE --known_failure_cases_file $CI_PROJECT_DIR/${KNOWN_FAILURE_CASES_FILE_NAME}
|
||||||
|
|
||||||
.example_test_template:
|
.example_test_template:
|
||||||
extends: .target_test_job_template
|
extends: .target_test_job_template
|
||||||
@ -427,10 +428,11 @@ test_app_test_flash_psram_esp32:
|
|||||||
- retry_failed git clone $TEST_ENV_CONFIG_REPO
|
- retry_failed git clone $TEST_ENV_CONFIG_REPO
|
||||||
- python $CHECKOUT_REF_SCRIPT ci-test-runner-configs ci-test-runner-configs
|
- python $CHECKOUT_REF_SCRIPT ci-test-runner-configs ci-test-runner-configs
|
||||||
# git clone the known failure cases repo, run test
|
# git clone the known failure cases repo, run test
|
||||||
- retry_failed git clone $KNOWN_FAILURE_CASES_REPO known_failure_cases
|
- pip install minio
|
||||||
|
- python tools/ci/get_known_failure_cases_file.py
|
||||||
# run test
|
# run test
|
||||||
- cd tools/ci/python_packages/tiny_test_fw/bin
|
- cd tools/ci/python_packages/tiny_test_fw/bin
|
||||||
- run_cmd python Runner.py $COMPONENT_UT_DIRS -c $CONFIG_FILE -e $ENV_FILE --known_failure_cases_file $CI_PROJECT_DIR/known_failure_cases/known_failure_cases.txt
|
- run_cmd python Runner.py $COMPONENT_UT_DIRS -c $CONFIG_FILE -e $ENV_FILE --known_failure_cases_file $CI_PROJECT_DIR/${KNOWN_FAILURE_CASES_FILE_NAME}
|
||||||
|
|
||||||
.component_ut_esp32_template:
|
.component_ut_esp32_template:
|
||||||
extends:
|
extends:
|
||||||
|
@ -32,3 +32,4 @@ tools/templates/sample_component/CMakeLists.txt
|
|||||||
tools/templates/sample_component/include/main.h
|
tools/templates/sample_component/include/main.h
|
||||||
tools/templates/sample_component/main.c
|
tools/templates/sample_component/main.c
|
||||||
tools/toolchain_versions.mk
|
tools/toolchain_versions.mk
|
||||||
|
tools/ci/get_known_failure_cases_file.py
|
||||||
|
37
tools/ci/get_known_failure_cases_file.py
Normal file
37
tools/ci/get_known_failure_cases_file.py
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
import urllib3
|
||||||
|
from minio import Minio
|
||||||
|
|
||||||
|
|
||||||
|
def getenv(env_var: str) -> str:
|
||||||
|
try:
|
||||||
|
return os.environ[env_var]
|
||||||
|
except KeyError as e:
|
||||||
|
raise Exception(f'Environment variable {env_var} not set') from e
|
||||||
|
|
||||||
|
|
||||||
|
def get_minio_client() -> Minio:
|
||||||
|
return Minio(
|
||||||
|
getenv('IDF_S3_SERVER').replace('https://', ''),
|
||||||
|
access_key=getenv('IDF_S3_ACCESS_KEY'),
|
||||||
|
secret_key=getenv('IDF_S3_SECRET_KEY'),
|
||||||
|
http_client=urllib3.PoolManager(
|
||||||
|
num_pools=10,
|
||||||
|
timeout=urllib3.Timeout.DEFAULT_TIMEOUT,
|
||||||
|
retries=urllib3.Retry(
|
||||||
|
total=5,
|
||||||
|
backoff_factor=0.2,
|
||||||
|
status_forcelist=[500, 502, 503, 504],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
client = get_minio_client()
|
||||||
|
file_name = getenv('KNOWN_FAILURE_CASES_FILE_NAME')
|
||||||
|
client.fget_object('ignore-test-result-files', file_name, file_name)
|
@ -2,3 +2,4 @@
|
|||||||
pexpect
|
pexpect
|
||||||
python-gitlab
|
python-gitlab
|
||||||
pygdbmi>=0.9.0.0
|
pygdbmi>=0.9.0.0
|
||||||
|
minio
|
||||||
|
Loading…
Reference in New Issue
Block a user