diff --git a/.gitlab/ci/assign-test.yml b/.gitlab/ci/assign-test.yml index 220f775d3f..6466d15bd8 100644 --- a/.gitlab/ci/assign-test.yml +++ b/.gitlab/ci/assign-test.yml @@ -110,6 +110,7 @@ assign_integration_test: - .rules:test:integration_test needs: - build_ssc_esp32 + - build_ssc_esp32c3 artifacts: paths: - $TEST_DIR/test_configs @@ -149,7 +150,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) diff --git a/.gitlab/ci/target-test.yml b/.gitlab/ci/target-test.yml index 4aabaf775a..38bbde76a1 100644 --- a/.gitlab/ci/target-test.yml +++ b/.gitlab/ci/target-test.yml @@ -767,18 +767,18 @@ component_ut_test_lan8720: extends: - .target_test_job_template - .rules:test:integration_test - 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: @@ -798,6 +798,12 @@ component_ut_test_lan8720: - 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: @@ -940,3 +946,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 diff --git a/tools/ci/checkout_project_ref.py b/tools/ci/checkout_project_ref.py index 975b7e9f29..a05c61322f 100755 --- a/tools/ci/checkout_project_ref.py +++ b/tools/ci/checkout_project_ref.py @@ -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): diff --git a/tools/ci/integration_test/KnownIssues b/tools/ci/integration_test/KnownIssues index 5b91d4389c..78a03c9df3 100644 --- a/tools/ci/integration_test/KnownIssues +++ b/tools/ci/integration_test/KnownIssues @@ -1,2 +1,4 @@ # MESH ESP32.MESH_EST_2109 + +ESP32C3.NIMBLE_GAP_14009 diff --git a/tools/ci/integration_test/README.md b/tools/ci/integration_test/README.md new file mode 100644 index 0000000000..16afb7650b --- /dev/null +++ b/tools/ci/integration_test/README.md @@ -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.