ci: update intergration test to support esp32c3

This commit is contained in:
Chen Yudong 2022-01-06 23:42:48 +08:00
parent ec4175b127
commit 11d4542165
5 changed files with 47 additions and 8 deletions

View File

@ -84,6 +84,7 @@ assign_integration_test:
- .rules:test:integration_test
needs:
- build_ssc_esp32
- build_ssc_esp32c3
artifacts:
paths:
- $TEST_DIR/test_configs
@ -123,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)

View File

@ -870,18 +870,18 @@ UT_S3_FLASH:
- .rules:test:integration_test
# needn't install idf python env
- .before_script_minimal
needs:
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}/tools/ci/integration_test/test_configs"
KNOWN_ISSUE_FILE: "${CI_PROJECT_DIR}/tools/ci/integration_test/KnownIssues"
PREPARE_TEST_BIN_SCRIPT: "${CI_PROJECT_DIR}/tools/ci/integration_test/prepare_test_bins.py"
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:
@ -905,6 +905,12 @@ UT_S3_FLASH:
- 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:
@ -1051,3 +1057,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

View File

@ -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):

View File

@ -3,3 +3,5 @@ ESP32.NIMBLE_GATT_60015
ESP32.BLUEDROID_GAP_03003
ESP32.BTPROF_A2DP_04011
ESP32.BTPROF_A2DP_05011
ESP32C3.NIMBLE_GAP_14009

View 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.