mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 21:24:32 +02:00
Merge branch 'ci/split_assign_test_and_add_c3_integration_test' into 'master'
ci: split assign test and add esp32c3 integration tests See merge request espressif/esp-idf!16664
This commit is contained in:
@@ -1,48 +1,108 @@
|
||||
assign_test:
|
||||
extends: .rules:test:any_test
|
||||
tags:
|
||||
- assign_test
|
||||
.assign_test_template:
|
||||
image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG
|
||||
stage: assign_test
|
||||
# gitlab ci do not support match job with RegEx or wildcard now in dependencies.
|
||||
# we have a lot build example jobs. now we don't use dependencies, just download all artifacts of build stage.
|
||||
dependencies: # Here is not a hard dependency relationship, could be skipped. so we do not use "needs" here.
|
||||
- build_ssc_esp32
|
||||
- build_esp_idf_tests_cmake_esp32
|
||||
- build_esp_idf_tests_cmake_esp32s2
|
||||
- build_esp_idf_tests_cmake_esp32s3
|
||||
- build_esp_idf_tests_cmake_esp32c3
|
||||
tags:
|
||||
- assign_test
|
||||
variables:
|
||||
SUBMODULES_TO_FETCH: "components/esptool_py/esptool"
|
||||
EXAMPLE_TEST_DIR: "${CI_PROJECT_DIR}/examples"
|
||||
CUSTOM_TEST_DIR: "${CI_PROJECT_DIR}/tools/test_apps"
|
||||
UNIT_TEST_DIR: "${CI_PROJECT_DIR}/components/idf_test/unit_test"
|
||||
INTEGRATION_CONFIG_OUTPUT_PATH: "${CI_PROJECT_DIR}/components/idf_test/integration_test/CIConfigs"
|
||||
SUBMODULES_TO_FETCH: components/esptool_py/esptool
|
||||
artifacts:
|
||||
paths:
|
||||
- ${TEST_DIR}/test_configs
|
||||
- ${BUILD_DIR}/artifact_index.json
|
||||
when: always
|
||||
expire_in: 1 week
|
||||
script:
|
||||
- python tools/ci/python_packages/ttfw_idf/IDFAssignTest.py $TEST_TYPE $TEST_DIR -c $CI_TARGET_TEST_CONFIG_FILE -o $TEST_DIR/test_configs
|
||||
|
||||
assign_example_test:
|
||||
extends:
|
||||
- .assign_test_template
|
||||
- .rules:build:example_test
|
||||
needs:
|
||||
- job: build_examples_cmake_esp32
|
||||
artifacts: false
|
||||
optional: true
|
||||
- job: build_examples_cmake_esp32s2
|
||||
artifacts: false
|
||||
optional: true
|
||||
- job: build_examples_cmake_esp32c3
|
||||
artifacts: false
|
||||
optional: true
|
||||
- job: build_examples_cmake_esp32s3
|
||||
artifacts: false
|
||||
optional: true
|
||||
variables:
|
||||
TEST_TYPE: example_test
|
||||
TEST_DIR: ${CI_PROJECT_DIR}/examples
|
||||
BUILD_DIR: ${CI_PROJECT_DIR}/build_examples
|
||||
|
||||
assign_custom_test:
|
||||
extends:
|
||||
- .assign_test_template
|
||||
- .rules:build:custom_test
|
||||
needs:
|
||||
- job: build_test_apps_esp32
|
||||
artifacts: false
|
||||
optional: true
|
||||
- job: build_test_apps_esp32s2
|
||||
artifacts: false
|
||||
optional: true
|
||||
- job: build_test_apps_esp32c3
|
||||
artifacts: false
|
||||
optional: true
|
||||
- job: build_test_apps_esp32s3
|
||||
artifacts: false
|
||||
optional: true
|
||||
variables:
|
||||
TEST_TYPE: custom_test
|
||||
TEST_DIR: ${CI_PROJECT_DIR}/tools/test_apps
|
||||
BUILD_DIR: ${CI_PROJECT_DIR}/build_test_apps
|
||||
|
||||
assign_unit_test:
|
||||
extends:
|
||||
- .assign_test_template
|
||||
- .rules:build:unit_test
|
||||
needs:
|
||||
- job: build_esp_idf_tests_cmake_esp32
|
||||
optional: true
|
||||
- job: build_esp_idf_tests_cmake_esp32s2
|
||||
optional: true
|
||||
- job: build_esp_idf_tests_cmake_esp32c3
|
||||
optional: true
|
||||
- job: build_esp_idf_tests_cmake_esp32s3
|
||||
optional: true
|
||||
variables:
|
||||
TEST_TYPE: unit_test
|
||||
TEST_DIR: ${CI_PROJECT_DIR}/components/idf_test/unit_test
|
||||
BUILD_DIR: ${CI_PROJECT_DIR}/tools/unit-test-app/builds
|
||||
script:
|
||||
- python tools/ci/python_packages/ttfw_idf/IDFAssignTest.py $TEST_TYPE $TEST_DIR -c $CI_TARGET_TEST_CONFIG_FILE -o $TEST_DIR/test_configs
|
||||
|
||||
assign_integration_test:
|
||||
extends:
|
||||
- .assign_test_template
|
||||
- .rules:test:integration_test
|
||||
needs:
|
||||
- build_ssc_esp32
|
||||
- build_ssc_esp32c3
|
||||
artifacts:
|
||||
paths:
|
||||
- $TEST_DIR/test_configs
|
||||
variables:
|
||||
TEST_DIR: ${CI_PROJECT_DIR}/tools/ci/integration_test
|
||||
BUILD_DIR: ${CI_PROJECT_DIR}/SSC/ssc_bin
|
||||
INTEGRATION_TEST_CASE_PATH: "${CI_PROJECT_DIR}/auto_test_script/TestCaseFiles"
|
||||
ASSIGN_TEST_CASE_SCRIPT: "${CI_PROJECT_DIR}/auto_test_script/bin/CIAssignTestCases.py"
|
||||
PYTHONPATH: ${CI_PROJECT_DIR}/auto_test_script/packages
|
||||
# auto_test_script only supports python 3.7.x
|
||||
PYTHON_VER: 3.7.7
|
||||
artifacts:
|
||||
paths:
|
||||
- components/idf_test/*/CIConfigs
|
||||
- $EXAMPLE_TEST_DIR/test_configs
|
||||
- $CUSTOM_TEST_DIR/test_configs
|
||||
- build_examples/artifact_index.json
|
||||
- build_test_apps/artifact_index.json
|
||||
- tools/unit-test-app/builds/artifact_index.json
|
||||
expire_in: 1 week
|
||||
script:
|
||||
- python tools/ci/python_packages/ttfw_idf/IDFAssignTest.py example_test $EXAMPLE_TEST_DIR -c $CI_TARGET_TEST_CONFIG_FILE -o $EXAMPLE_TEST_DIR/test_configs
|
||||
- python tools/ci/python_packages/ttfw_idf/IDFAssignTest.py custom_test $CUSTOM_TEST_DIR -c $CI_TARGET_TEST_CONFIG_FILE -o $CUSTOM_TEST_DIR/test_configs
|
||||
- python tools/ci/python_packages/ttfw_idf/IDFAssignTest.py unit_test $UNIT_TEST_DIR -c $CI_TARGET_TEST_CONFIG_FILE -o $UNIT_TEST_DIR/CIConfigs
|
||||
# clone test script to assign tests
|
||||
# can not retry if downing git lfs files failed, so using empty_branch first.
|
||||
- retry_failed git clone ${CI_AUTO_TEST_SCRIPT_REPO_URL} -b empty_branch
|
||||
- retry_failed git -C auto_test_script checkout -f ${CI_AUTO_TEST_SCRIPT_REPO_BRANCH}
|
||||
- python $CHECKOUT_REF_SCRIPT auto_test_script auto_test_script --customized_only
|
||||
# assign integration test cases
|
||||
- python ${ASSIGN_TEST_CASE_SCRIPT} -t ${INTEGRATION_TEST_CASE_PATH} -c $CI_TARGET_TEST_CONFIG_FILE -b $IDF_PATH/SSC/ssc_bin -o $INTEGRATION_CONFIG_OUTPUT_PATH
|
||||
- python ${ASSIGN_TEST_CASE_SCRIPT} -t ${INTEGRATION_TEST_CASE_PATH} -c $CI_TARGET_TEST_CONFIG_FILE -b ${BUILD_DIR} -o $TEST_DIR/test_configs
|
||||
|
||||
update_test_cases:
|
||||
extends: .rules:ref:master-schedule
|
||||
@@ -64,7 +124,7 @@ update_test_cases:
|
||||
SUBMODULES_TO_FETCH: "components/esptool_py/esptool"
|
||||
UNIT_TEST_DIR: "${CI_PROJECT_DIR}/components/idf_test/unit_test"
|
||||
BOT_ACCOUNT_CONFIG_FILE: "${CI_PROJECT_DIR}/test-management/Config/Account.local.yml"
|
||||
AUTO_TEST_SCRIPT_PATH: "${CI_PROJECT_DIR}/auto_test_script"
|
||||
PYTHONPATH: ${CI_PROJECT_DIR}/auto_test_script/packages
|
||||
PYTHON_VER: 3.7.7
|
||||
script:
|
||||
- export GIT_SHA=$(echo ${PIPELINE_COMMIT_SHA} | cut -c 1-8)
|
||||
|
@@ -63,6 +63,9 @@
|
||||
patterns:
|
||||
- build_components
|
||||
- build_system
|
||||
included_in:
|
||||
- "build:{0}"
|
||||
- build:target_test
|
||||
|
||||
build:integration_test:
|
||||
labels:
|
||||
@@ -70,6 +73,8 @@ build:integration_test:
|
||||
patterns:
|
||||
- build_components
|
||||
- build_system
|
||||
included_in:
|
||||
- build:target_test
|
||||
|
||||
####################
|
||||
# Target Test Jobs #
|
||||
@@ -81,14 +86,14 @@ build:integration_test:
|
||||
labels: # For each rule, use labels <test_type> and <test_type>-<target>
|
||||
- "{0}"
|
||||
- "{0}_{1}"
|
||||
- target_test
|
||||
patterns: # For each rule, use patterns <test_type> and build-<test_type>
|
||||
- "{0}"
|
||||
- "build-{0}"
|
||||
included_in: # Parent rules
|
||||
- "build:{0}"
|
||||
- "build:{0}-{1}"
|
||||
- build:target_test
|
||||
- test:target_test
|
||||
- test:any_test
|
||||
|
||||
# -------------
|
||||
# Special Cases
|
||||
@@ -101,33 +106,30 @@ build:integration_test:
|
||||
- "component_ut_{0}"
|
||||
- unit_test
|
||||
- "unit_test_{0}"
|
||||
- target_test
|
||||
patterns:
|
||||
- component_ut
|
||||
- "build-component_ut-{0}"
|
||||
included_in:
|
||||
- build:component_ut
|
||||
- "build:component_ut-{0}"
|
||||
- build:target_test
|
||||
- test:target_test
|
||||
- test:any_test
|
||||
|
||||
"test:integration_test":
|
||||
labels:
|
||||
- "integration_test"
|
||||
- integration_test
|
||||
- target_test
|
||||
patterns:
|
||||
- "integration_test"
|
||||
- integration_test
|
||||
included_in:
|
||||
- "build:integration_test"
|
||||
- build:integration_test
|
||||
- build:target_test
|
||||
- test:target_test
|
||||
- test:any_test
|
||||
|
||||
"test:host_test":
|
||||
labels:
|
||||
- host_test
|
||||
patterns:
|
||||
- host_test
|
||||
included_in:
|
||||
- test:any_test
|
||||
|
||||
"test:submodule":
|
||||
labels:
|
||||
@@ -142,17 +144,17 @@ build:integration_test:
|
||||
labels:
|
||||
- iperf_stress_test
|
||||
included_in:
|
||||
- build:example_test
|
||||
- build:example_test-esp32
|
||||
- build:target_test
|
||||
- test:any_test
|
||||
|
||||
"labels:weekend_test": # custom test
|
||||
labels:
|
||||
- weekend_test
|
||||
included_in:
|
||||
- build:custom_test
|
||||
- build:custom_test-esp32
|
||||
- build:target_test
|
||||
- test:any_test
|
||||
|
||||
"labels:nvs_coverage": # host_test
|
||||
labels:
|
||||
|
@@ -92,6 +92,7 @@
|
||||
|
||||
.patterns-integration_test: &patterns-integration_test
|
||||
- "tools/ci/python_packages/tiny_test_fw/**/*"
|
||||
- "tools/ci/integration_test/**/*"
|
||||
|
||||
.patterns-host_test: &patterns-host_test
|
||||
- ".gitlab/ci/host-test.yml"
|
||||
@@ -365,6 +366,9 @@
|
||||
.if-label-submodule: &if-label-submodule
|
||||
if: '$BOT_LABEL_SUBMODULE || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*submodule(?:,[^,\n\r]+)*$/i'
|
||||
|
||||
.if-label-target_test: &if-label-target_test
|
||||
if: '$BOT_LABEL_TARGET_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*target_test(?:,[^,\n\r]+)*$/i'
|
||||
|
||||
.if-label-unit_test: &if-label-unit_test
|
||||
if: '$BOT_LABEL_UNIT_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*unit_test(?:,[^,\n\r]+)*$/i'
|
||||
|
||||
@@ -403,6 +407,34 @@
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build_system
|
||||
|
||||
.rules:build:component_ut:
|
||||
rules:
|
||||
- <<: *if-revert-branch
|
||||
when: never
|
||||
- <<: *if-protected
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-component_ut
|
||||
- <<: *if-label-component_ut_esp32
|
||||
- <<: *if-label-component_ut_esp32c2
|
||||
- <<: *if-label-component_ut_esp32c3
|
||||
- <<: *if-label-component_ut_esp32h2
|
||||
- <<: *if-label-component_ut_esp32s2
|
||||
- <<: *if-label-component_ut_esp32s3
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32
|
||||
- <<: *if-label-unit_test_esp32c2
|
||||
- <<: *if-label-unit_test_esp32c3
|
||||
- <<: *if-label-unit_test_esp32h2
|
||||
- <<: *if-label-unit_test_esp32s2
|
||||
- <<: *if-label-unit_test_esp32s3
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build_components
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build_system
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-component_ut
|
||||
|
||||
.rules:build:component_ut-esp32:
|
||||
rules:
|
||||
- <<: *if-revert-branch
|
||||
@@ -411,6 +443,7 @@
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-component_ut
|
||||
- <<: *if-label-component_ut_esp32
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32
|
||||
- <<: *if-dev-push
|
||||
@@ -428,6 +461,7 @@
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-component_ut
|
||||
- <<: *if-label-component_ut_esp32c2
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32c2
|
||||
- <<: *if-dev-push
|
||||
@@ -445,6 +479,7 @@
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-component_ut
|
||||
- <<: *if-label-component_ut_esp32c3
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32c3
|
||||
- <<: *if-dev-push
|
||||
@@ -462,6 +497,7 @@
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-component_ut
|
||||
- <<: *if-label-component_ut_esp32h2
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32h2
|
||||
- <<: *if-dev-push
|
||||
@@ -479,6 +515,7 @@
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-component_ut
|
||||
- <<: *if-label-component_ut_esp32s2
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32s2
|
||||
- <<: *if-dev-push
|
||||
@@ -496,6 +533,7 @@
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-component_ut
|
||||
- <<: *if-label-component_ut_esp32s3
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32s3
|
||||
- <<: *if-dev-push
|
||||
@@ -505,6 +543,28 @@
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-component_ut
|
||||
|
||||
.rules:build:custom_test:
|
||||
rules:
|
||||
- <<: *if-revert-branch
|
||||
when: never
|
||||
- <<: *if-protected
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-custom_test
|
||||
- <<: *if-label-custom_test_esp32
|
||||
- <<: *if-label-custom_test_esp32c2
|
||||
- <<: *if-label-custom_test_esp32c3
|
||||
- <<: *if-label-custom_test_esp32h2
|
||||
- <<: *if-label-custom_test_esp32s2
|
||||
- <<: *if-label-custom_test_esp32s3
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-weekend_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build_components
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build_system
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-custom_test
|
||||
|
||||
.rules:build:custom_test-esp32:
|
||||
rules:
|
||||
- <<: *if-revert-branch
|
||||
@@ -513,6 +573,7 @@
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-custom_test
|
||||
- <<: *if-label-custom_test_esp32
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-weekend_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build_components
|
||||
@@ -529,6 +590,7 @@
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-custom_test
|
||||
- <<: *if-label-custom_test_esp32c2
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build_components
|
||||
- <<: *if-dev-push
|
||||
@@ -544,6 +606,7 @@
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-custom_test
|
||||
- <<: *if-label-custom_test_esp32c3
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build_components
|
||||
- <<: *if-dev-push
|
||||
@@ -559,6 +622,7 @@
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-custom_test
|
||||
- <<: *if-label-custom_test_esp32h2
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build_components
|
||||
- <<: *if-dev-push
|
||||
@@ -574,6 +638,7 @@
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-custom_test
|
||||
- <<: *if-label-custom_test_esp32s2
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build_components
|
||||
- <<: *if-dev-push
|
||||
@@ -589,6 +654,7 @@
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-custom_test
|
||||
- <<: *if-label-custom_test_esp32s3
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build_components
|
||||
- <<: *if-dev-push
|
||||
@@ -606,6 +672,30 @@
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-docker
|
||||
|
||||
.rules:build:example_test:
|
||||
rules:
|
||||
- <<: *if-revert-branch
|
||||
when: never
|
||||
- <<: *if-protected
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-example_test
|
||||
- <<: *if-label-example_test_esp32
|
||||
- <<: *if-label-example_test_esp32c2
|
||||
- <<: *if-label-example_test_esp32c3
|
||||
- <<: *if-label-example_test_esp32h2
|
||||
- <<: *if-label-example_test_esp32s2
|
||||
- <<: *if-label-example_test_esp32s3
|
||||
- <<: *if-label-iperf_stress_test
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build-example_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build_components
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build_system
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-example_test
|
||||
|
||||
.rules:build:example_test-esp32:
|
||||
rules:
|
||||
- <<: *if-revert-branch
|
||||
@@ -615,6 +705,7 @@
|
||||
- <<: *if-label-example_test
|
||||
- <<: *if-label-example_test_esp32
|
||||
- <<: *if-label-iperf_stress_test
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build-example_test
|
||||
- <<: *if-dev-push
|
||||
@@ -632,6 +723,7 @@
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-example_test
|
||||
- <<: *if-label-example_test_esp32c2
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build-example_test
|
||||
- <<: *if-dev-push
|
||||
@@ -649,6 +741,7 @@
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-example_test
|
||||
- <<: *if-label-example_test_esp32c3
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build-example_test
|
||||
- <<: *if-dev-push
|
||||
@@ -666,6 +759,7 @@
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-example_test
|
||||
- <<: *if-label-example_test_esp32h2
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build-example_test
|
||||
- <<: *if-dev-push
|
||||
@@ -683,6 +777,7 @@
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-example_test
|
||||
- <<: *if-label-example_test_esp32s2
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build-example_test
|
||||
- <<: *if-dev-push
|
||||
@@ -700,6 +795,7 @@
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-example_test
|
||||
- <<: *if-label-example_test_esp32s3
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build-example_test
|
||||
- <<: *if-dev-push
|
||||
@@ -716,6 +812,7 @@
|
||||
- <<: *if-protected
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-integration_test
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build_components
|
||||
- <<: *if-dev-push
|
||||
@@ -763,6 +860,7 @@
|
||||
- <<: *if-label-example_test_esp32s3
|
||||
- <<: *if-label-integration_test
|
||||
- <<: *if-label-iperf_stress_test
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32
|
||||
- <<: *if-label-unit_test_esp32c2
|
||||
@@ -788,12 +886,34 @@
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-unit_test
|
||||
|
||||
.rules:build:unit_test:
|
||||
rules:
|
||||
- <<: *if-revert-branch
|
||||
when: never
|
||||
- <<: *if-protected
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32
|
||||
- <<: *if-label-unit_test_esp32c2
|
||||
- <<: *if-label-unit_test_esp32c3
|
||||
- <<: *if-label-unit_test_esp32h2
|
||||
- <<: *if-label-unit_test_esp32s2
|
||||
- <<: *if-label-unit_test_esp32s3
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build_components
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build_system
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-unit_test
|
||||
|
||||
.rules:build:unit_test-esp32:
|
||||
rules:
|
||||
- <<: *if-revert-branch
|
||||
when: never
|
||||
- <<: *if-protected
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32
|
||||
- <<: *if-dev-push
|
||||
@@ -809,6 +929,7 @@
|
||||
when: never
|
||||
- <<: *if-protected
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32c2
|
||||
- <<: *if-dev-push
|
||||
@@ -824,6 +945,7 @@
|
||||
when: never
|
||||
- <<: *if-protected
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32c3
|
||||
- <<: *if-dev-push
|
||||
@@ -839,6 +961,7 @@
|
||||
when: never
|
||||
- <<: *if-protected
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32h2
|
||||
- <<: *if-dev-push
|
||||
@@ -854,6 +977,7 @@
|
||||
when: never
|
||||
- <<: *if-protected
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32s2
|
||||
- <<: *if-dev-push
|
||||
@@ -869,6 +993,7 @@
|
||||
when: never
|
||||
- <<: *if-protected
|
||||
- <<: *if-label-build
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32s3
|
||||
- <<: *if-dev-push
|
||||
@@ -915,60 +1040,6 @@
|
||||
when: never
|
||||
- <<: *if-label-weekend_test
|
||||
|
||||
.rules:test:any_test:
|
||||
rules:
|
||||
- <<: *if-revert-branch
|
||||
when: never
|
||||
- <<: *if-protected
|
||||
- <<: *if-label-build-only
|
||||
when: never
|
||||
- <<: *if-label-component_ut
|
||||
- <<: *if-label-component_ut_esp32
|
||||
- <<: *if-label-component_ut_esp32c2
|
||||
- <<: *if-label-component_ut_esp32c3
|
||||
- <<: *if-label-component_ut_esp32h2
|
||||
- <<: *if-label-component_ut_esp32s2
|
||||
- <<: *if-label-component_ut_esp32s3
|
||||
- <<: *if-label-custom_test
|
||||
- <<: *if-label-custom_test_esp32
|
||||
- <<: *if-label-custom_test_esp32c2
|
||||
- <<: *if-label-custom_test_esp32c3
|
||||
- <<: *if-label-custom_test_esp32h2
|
||||
- <<: *if-label-custom_test_esp32s2
|
||||
- <<: *if-label-custom_test_esp32s3
|
||||
- <<: *if-label-example_test
|
||||
- <<: *if-label-example_test_esp32
|
||||
- <<: *if-label-example_test_esp32c2
|
||||
- <<: *if-label-example_test_esp32c3
|
||||
- <<: *if-label-example_test_esp32h2
|
||||
- <<: *if-label-example_test_esp32s2
|
||||
- <<: *if-label-example_test_esp32s3
|
||||
- <<: *if-label-host_test
|
||||
- <<: *if-label-integration_test
|
||||
- <<: *if-label-iperf_stress_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32
|
||||
- <<: *if-label-unit_test_esp32c2
|
||||
- <<: *if-label-unit_test_esp32c3
|
||||
- <<: *if-label-unit_test_esp32h2
|
||||
- <<: *if-label-unit_test_esp32s2
|
||||
- <<: *if-label-unit_test_esp32s3
|
||||
- <<: *if-label-weekend_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build-example_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-component_ut
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-custom_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-example_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-host_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-integration_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-unit_test
|
||||
|
||||
.rules:test:component_ut-esp32:
|
||||
rules:
|
||||
- <<: *if-revert-branch
|
||||
@@ -978,6 +1049,7 @@
|
||||
when: never
|
||||
- <<: *if-label-component_ut
|
||||
- <<: *if-label-component_ut_esp32
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32
|
||||
- <<: *if-dev-push
|
||||
@@ -992,6 +1064,7 @@
|
||||
when: never
|
||||
- <<: *if-label-component_ut
|
||||
- <<: *if-label-component_ut_esp32c2
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32c2
|
||||
- <<: *if-dev-push
|
||||
@@ -1006,6 +1079,7 @@
|
||||
when: never
|
||||
- <<: *if-label-component_ut
|
||||
- <<: *if-label-component_ut_esp32c3
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32c3
|
||||
- <<: *if-dev-push
|
||||
@@ -1020,6 +1094,7 @@
|
||||
when: never
|
||||
- <<: *if-label-component_ut
|
||||
- <<: *if-label-component_ut_esp32h2
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32h2
|
||||
- <<: *if-dev-push
|
||||
@@ -1034,6 +1109,7 @@
|
||||
when: never
|
||||
- <<: *if-label-component_ut
|
||||
- <<: *if-label-component_ut_esp32s2
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32s2
|
||||
- <<: *if-dev-push
|
||||
@@ -1048,6 +1124,7 @@
|
||||
when: never
|
||||
- <<: *if-label-component_ut
|
||||
- <<: *if-label-component_ut_esp32s3
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32s3
|
||||
- <<: *if-dev-push
|
||||
@@ -1062,6 +1139,7 @@
|
||||
when: never
|
||||
- <<: *if-label-custom_test
|
||||
- <<: *if-label-custom_test_esp32
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-custom_test
|
||||
|
||||
@@ -1074,6 +1152,7 @@
|
||||
when: never
|
||||
- <<: *if-label-custom_test
|
||||
- <<: *if-label-custom_test_esp32c2
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-custom_test
|
||||
|
||||
@@ -1086,6 +1165,7 @@
|
||||
when: never
|
||||
- <<: *if-label-custom_test
|
||||
- <<: *if-label-custom_test_esp32c3
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-custom_test
|
||||
|
||||
@@ -1098,6 +1178,7 @@
|
||||
when: never
|
||||
- <<: *if-label-custom_test
|
||||
- <<: *if-label-custom_test_esp32h2
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-custom_test
|
||||
|
||||
@@ -1110,6 +1191,7 @@
|
||||
when: never
|
||||
- <<: *if-label-custom_test
|
||||
- <<: *if-label-custom_test_esp32s2
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-custom_test
|
||||
|
||||
@@ -1122,6 +1204,7 @@
|
||||
when: never
|
||||
- <<: *if-label-custom_test
|
||||
- <<: *if-label-custom_test_esp32s3
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-custom_test
|
||||
|
||||
@@ -1134,6 +1217,7 @@
|
||||
when: never
|
||||
- <<: *if-label-example_test
|
||||
- <<: *if-label-example_test_esp32
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build-example_test
|
||||
- <<: *if-dev-push
|
||||
@@ -1148,6 +1232,7 @@
|
||||
when: never
|
||||
- <<: *if-label-example_test
|
||||
- <<: *if-label-example_test_esp32c2
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build-example_test
|
||||
- <<: *if-dev-push
|
||||
@@ -1162,6 +1247,7 @@
|
||||
when: never
|
||||
- <<: *if-label-example_test
|
||||
- <<: *if-label-example_test_esp32c3
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build-example_test
|
||||
- <<: *if-dev-push
|
||||
@@ -1176,6 +1262,7 @@
|
||||
when: never
|
||||
- <<: *if-label-example_test
|
||||
- <<: *if-label-example_test_esp32h2
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build-example_test
|
||||
- <<: *if-dev-push
|
||||
@@ -1190,6 +1277,7 @@
|
||||
when: never
|
||||
- <<: *if-label-example_test
|
||||
- <<: *if-label-example_test_esp32s2
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build-example_test
|
||||
- <<: *if-dev-push
|
||||
@@ -1204,6 +1292,7 @@
|
||||
when: never
|
||||
- <<: *if-label-example_test
|
||||
- <<: *if-label-example_test_esp32s3
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build-example_test
|
||||
- <<: *if-dev-push
|
||||
@@ -1228,6 +1317,7 @@
|
||||
- <<: *if-label-build-only
|
||||
when: never
|
||||
- <<: *if-label-integration_test
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-integration_test
|
||||
|
||||
@@ -1242,55 +1332,6 @@
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-submodule
|
||||
|
||||
.rules:test:target_test:
|
||||
rules:
|
||||
- <<: *if-revert-branch
|
||||
when: never
|
||||
- <<: *if-protected
|
||||
- <<: *if-label-build-only
|
||||
when: never
|
||||
- <<: *if-label-component_ut
|
||||
- <<: *if-label-component_ut_esp32
|
||||
- <<: *if-label-component_ut_esp32c2
|
||||
- <<: *if-label-component_ut_esp32c3
|
||||
- <<: *if-label-component_ut_esp32h2
|
||||
- <<: *if-label-component_ut_esp32s2
|
||||
- <<: *if-label-component_ut_esp32s3
|
||||
- <<: *if-label-custom_test
|
||||
- <<: *if-label-custom_test_esp32
|
||||
- <<: *if-label-custom_test_esp32c2
|
||||
- <<: *if-label-custom_test_esp32c3
|
||||
- <<: *if-label-custom_test_esp32h2
|
||||
- <<: *if-label-custom_test_esp32s2
|
||||
- <<: *if-label-custom_test_esp32s3
|
||||
- <<: *if-label-example_test
|
||||
- <<: *if-label-example_test_esp32
|
||||
- <<: *if-label-example_test_esp32c2
|
||||
- <<: *if-label-example_test_esp32c3
|
||||
- <<: *if-label-example_test_esp32h2
|
||||
- <<: *if-label-example_test_esp32s2
|
||||
- <<: *if-label-example_test_esp32s3
|
||||
- <<: *if-label-integration_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32
|
||||
- <<: *if-label-unit_test_esp32c2
|
||||
- <<: *if-label-unit_test_esp32c3
|
||||
- <<: *if-label-unit_test_esp32h2
|
||||
- <<: *if-label-unit_test_esp32s2
|
||||
- <<: *if-label-unit_test_esp32s3
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-build-example_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-component_ut
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-custom_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-example_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-integration_test
|
||||
- <<: *if-dev-push
|
||||
changes: *patterns-unit_test
|
||||
|
||||
.rules:test:unit_test-esp32:
|
||||
rules:
|
||||
- <<: *if-revert-branch
|
||||
@@ -1298,6 +1339,7 @@
|
||||
- <<: *if-protected
|
||||
- <<: *if-label-build-only
|
||||
when: never
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32
|
||||
- <<: *if-dev-push
|
||||
@@ -1310,6 +1352,7 @@
|
||||
- <<: *if-protected
|
||||
- <<: *if-label-build-only
|
||||
when: never
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32c2
|
||||
- <<: *if-dev-push
|
||||
@@ -1322,6 +1365,7 @@
|
||||
- <<: *if-protected
|
||||
- <<: *if-label-build-only
|
||||
when: never
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32c3
|
||||
- <<: *if-dev-push
|
||||
@@ -1334,6 +1378,7 @@
|
||||
- <<: *if-protected
|
||||
- <<: *if-label-build-only
|
||||
when: never
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32h2
|
||||
- <<: *if-dev-push
|
||||
@@ -1346,6 +1391,7 @@
|
||||
- <<: *if-protected
|
||||
- <<: *if-label-build-only
|
||||
when: never
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32s2
|
||||
- <<: *if-dev-push
|
||||
@@ -1358,6 +1404,7 @@
|
||||
- <<: *if-protected
|
||||
- <<: *if-label-build-only
|
||||
when: never
|
||||
- <<: *if-label-target_test
|
||||
- <<: *if-label-unit_test
|
||||
- <<: *if-label-unit_test_esp32s3
|
||||
- <<: *if-dev-push
|
||||
|
@@ -173,13 +173,13 @@ component_ut_pytest_esp32c3_generic:
|
||||
|
||||
.target_test_job_template:
|
||||
stage: target_test
|
||||
needs:
|
||||
- assign_test
|
||||
artifacts:
|
||||
when: always
|
||||
paths:
|
||||
- "**/*.log"
|
||||
- $LOG_PATH
|
||||
exclude:
|
||||
- .git/**/*
|
||||
expire_in: 1 week
|
||||
reports:
|
||||
junit: $LOG_PATH/*/XUNIT_RESULT.xml
|
||||
@@ -204,6 +204,8 @@ component_ut_pytest_esp32c3_generic:
|
||||
|
||||
.example_test_template:
|
||||
extends: .target_test_job_template
|
||||
needs:
|
||||
- assign_example_test
|
||||
variables:
|
||||
TEST_CASE_PATH: "$CI_PROJECT_DIR/examples"
|
||||
CONFIG_FILE_PATH: "${CI_PROJECT_DIR}/examples/test_configs"
|
||||
@@ -467,6 +469,8 @@ example_test_ESP32C3_SDSPI:
|
||||
|
||||
.test_app_template:
|
||||
extends: .target_test_job_template
|
||||
needs:
|
||||
- assign_custom_test
|
||||
variables:
|
||||
TEST_CASE_PATH: "$CI_PROJECT_DIR/tools/test_apps"
|
||||
CONFIG_FILE_PATH: "${CI_PROJECT_DIR}/tools/test_apps/test_configs"
|
||||
@@ -558,9 +562,11 @@ test_app_test_flash_psram_f8r8:
|
||||
|
||||
.unit_test_template:
|
||||
extends: .target_test_job_template
|
||||
needs: # the assign already needs all the build jobs
|
||||
- assign_unit_test
|
||||
variables:
|
||||
TEST_CASE_PATH: "$CI_PROJECT_DIR/tools/unit-test-app"
|
||||
CONFIG_FILE_PATH: "${CI_PROJECT_DIR}/components/idf_test/unit_test/CIConfigs"
|
||||
CONFIG_FILE_PATH: "${CI_PROJECT_DIR}/components/idf_test/unit_test/test_configs"
|
||||
|
||||
.unit_test_esp32_template:
|
||||
extends:
|
||||
@@ -866,18 +872,18 @@ UT_S3_FLASH:
|
||||
- .rules:test:integration_test
|
||||
# needn't install idf python env
|
||||
- .before_script_minimal
|
||||
needs:
|
||||
- assign_test
|
||||
- build_ssc_esp32
|
||||
needs: # the assign already needs all the build jobs
|
||||
- assign_integration_test
|
||||
variables:
|
||||
LOCAL_ENV_CONFIG_PATH: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/ESP32_IDF"
|
||||
LOG_PATH: "${CI_PROJECT_DIR}/TEST_LOGS"
|
||||
TEST_CASE_FILE_PATH: "$CI_PROJECT_DIR/auto_test_script/TestCaseFiles"
|
||||
MODULE_UPDATE_FILE: "$CI_PROJECT_DIR/components/idf_test/ModuleDefinition.yml"
|
||||
CONFIG_FILE_PATH: "${CI_PROJECT_DIR}/components/idf_test/integration_test/CIConfigs"
|
||||
KNOWN_ISSUE_FILE: "${CI_PROJECT_DIR}/components/idf_test/integration_test/KnownIssues"
|
||||
CONFIG_FILE_PATH: "${CI_PROJECT_DIR}/tools/ci/integration_test/test_configs"
|
||||
KNOWN_ISSUE_FILE: "${CI_PROJECT_DIR}/tools/ci/integration_test/KnownIssues"
|
||||
CI_RUNNER_SCRIPT: "${CI_PROJECT_DIR}/auto_test_script/bin/CIRunner.py"
|
||||
PYTHONPATH: ${CI_PROJECT_DIR}/auto_test_script/packages
|
||||
PREPARE_TEST_BIN_SCRIPT: "${CI_PROJECT_DIR}/tools/ci/integration_test/prepare_test_bins.py"
|
||||
PYTHONPATH: "${CI_PROJECT_DIR}/auto_test_script/packages:${PYTHONPATH}"
|
||||
INITIAL_CONDITION_RETRY_COUNT: "1"
|
||||
# auto_test_script only supports python 3.7.x
|
||||
PYTHON_VER: 3.7.7
|
||||
script:
|
||||
@@ -898,8 +904,15 @@ UT_S3_FLASH:
|
||||
- python $CHECKOUT_REF_SCRIPT auto_test_script auto_test_script --customized_only
|
||||
- cat ${KNOWN_ISSUE_FILE} >> ${TEST_CASE_FILE_PATH}/KnownIssues
|
||||
# run test
|
||||
- python ${PREPARE_TEST_BIN_SCRIPT} $CONFIG_FILE
|
||||
- python ${CI_RUNNER_SCRIPT} -l "$LOG_PATH/$JOB_FULL_NAME" -c $CONFIG_FILE -e $LOCAL_ENV_CONFIG_PATH -t $TEST_CASE_FILE_PATH
|
||||
|
||||
.integration_test_esp32c3_template:
|
||||
extends:
|
||||
- .integration_test_template
|
||||
variables:
|
||||
LOCAL_ENV_CONFIG_PATH: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/ESP32C3_IDF"
|
||||
|
||||
nvs_compatible_test:
|
||||
extends: .integration_test_template
|
||||
artifacts:
|
||||
@@ -931,6 +944,7 @@ nvs_compatible_test:
|
||||
- cd auto_test_script
|
||||
- ./tools/prepare_nvs_bin.sh
|
||||
# run test
|
||||
- python ${PREPARE_TEST_BIN_SCRIPT} $CONFIG_FILE
|
||||
- python ${CI_RUNNER_SCRIPT} -l "$LOG_PATH/$JOB_FULL_NAME" -c $CONFIG_FILE -e $LOCAL_ENV_CONFIG_PATH -t $TEST_CASE_FILE_PATH
|
||||
|
||||
IT_001:
|
||||
@@ -1045,3 +1059,10 @@ IT_022:
|
||||
tags:
|
||||
- ESP32_IDF
|
||||
- SSC_T3_2
|
||||
|
||||
IT_C3_001:
|
||||
extends: .integration_test_esp32c3_template
|
||||
parallel: 6
|
||||
tags:
|
||||
- ESP32C3_IDF
|
||||
- SSC_T2_5
|
||||
|
@@ -84,11 +84,13 @@ if __name__ == '__main__':
|
||||
|
||||
ref_to_use = ''
|
||||
for candidate in candidate_branches:
|
||||
# check if candidate branch exists
|
||||
branch_match = subprocess.check_output(['git', 'branch', '-a', '--list', 'origin/' + candidate])
|
||||
if branch_match:
|
||||
# check if the branch, tag or commit exists
|
||||
try:
|
||||
subprocess.check_call(['git', 'cat-file', '-t', candidate], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
ref_to_use = candidate
|
||||
break
|
||||
except subprocess.CalledProcessError:
|
||||
continue
|
||||
|
||||
if ref_to_use:
|
||||
for _ in range(RETRY_COUNT):
|
||||
|
@@ -3,3 +3,5 @@ ESP32.NIMBLE_GATT_60015
|
||||
ESP32.BLUEDROID_GAP_03003
|
||||
ESP32.BTPROF_A2DP_04011
|
||||
ESP32.BTPROF_A2DP_05011
|
||||
|
||||
ESP32C3.NIMBLE_GAP_14009
|
21
tools/ci/integration_test/README.md
Normal file
21
tools/ci/integration_test/README.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Integration Test Description
|
||||
|
||||
## Case Lists
|
||||
- WiFi Standard cases for only esp32.
|
||||
- BLE Standard cases for esp32 and esp32c3.
|
||||
|
||||
## Trigger
|
||||
- By labels:
|
||||
- `integration_test`
|
||||
- By file changes:
|
||||
- integration test related files
|
||||
- By bot:
|
||||
- `@bot test with label: integration_test`
|
||||
|
||||
## Advanced
|
||||
- There are labels can be used to run less integration test cases.
|
||||
- These labels only take effect when the integration test has been triggered.
|
||||
- label: `integration::wifi_only`
|
||||
- Only run WiFi cases.
|
||||
- label: `integration::ble_only`
|
||||
- Only run BLE cases.
|
67
tools/ci/integration_test/prepare_test_bins.py
Normal file
67
tools/ci/integration_test/prepare_test_bins.py
Normal file
@@ -0,0 +1,67 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import argparse
|
||||
import os
|
||||
|
||||
import gitlab
|
||||
import gitlab_api
|
||||
from AutoTestScript.RunnerConfigs.Config import Config
|
||||
|
||||
SSC_BUILD_JOB_MAP = {
|
||||
'ESP32': 'build_ssc_esp32',
|
||||
'ESP32C3': 'build_ssc_esp32c3',
|
||||
}
|
||||
NEEDED_FILES = [
|
||||
'flasher_args.json',
|
||||
'bootloader/bootloader.bin',
|
||||
'partition_table/partition-table.bin',
|
||||
'ssc.bin',
|
||||
'ssc.elf',
|
||||
]
|
||||
IDF_PATH = os.environ.get('IDF_PATH')
|
||||
|
||||
|
||||
def try_to_download_artifacts(bin_path: str) -> None:
|
||||
'''
|
||||
bin_path: "SSC/ssc_bin/ESP32[C3]/SSC[_APP]"
|
||||
'''
|
||||
project_id = os.getenv('CI_PROJECT_ID')
|
||||
pipeline_id = os.getenv('CI_PIPELINE_ID')
|
||||
gitlab_inst = gitlab_api.Gitlab(project_id)
|
||||
build_job_name = SSC_BUILD_JOB_MAP[bin_path.split('/')[-2]]
|
||||
job_list = gitlab_inst.find_job_id(build_job_name, pipeline_id=pipeline_id)
|
||||
files_to_download = [os.path.join(bin_path, f) for f in NEEDED_FILES]
|
||||
for job_info in job_list:
|
||||
try:
|
||||
gitlab_inst.download_artifact(job_info['id'], files_to_download, IDF_PATH)
|
||||
print('Downloaded {} from {}'.format(bin_path, job_info['id']))
|
||||
break
|
||||
except gitlab.exceptions.GitlabError as e:
|
||||
if e.response_code == 404:
|
||||
continue
|
||||
raise
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
'test_config_file',
|
||||
help='The test config file to be used.'
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
configs = Config.parse(args.test_config_file)
|
||||
test_bin_paths = configs.get_bin_paths()
|
||||
|
||||
for _path in test_bin_paths:
|
||||
if os.path.exists(_path):
|
||||
continue
|
||||
relative_path = os.path.relpath(_path, IDF_PATH)
|
||||
try_to_download_artifacts(relative_path)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@@ -29,7 +29,7 @@ def retry(func: TR) -> TR:
|
||||
if e.response_code == 500:
|
||||
# retry on this error
|
||||
pass
|
||||
elif e.response_code == 404:
|
||||
elif e.response_code == 404 and os.environ.get('LOCAL_GITLAB_HTTPS_HOST', None):
|
||||
# remove the environment variable "LOCAL_GITLAB_HTTPS_HOST" and retry
|
||||
os.environ.pop('LOCAL_GITLAB_HTTPS_HOST', None)
|
||||
else:
|
||||
|
Reference in New Issue
Block a user