2022-01-06 10:21:21 -05:00
|
|
|
.assign_test_template:
|
2019-06-28 12:39:21 -04:00
|
|
|
image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG
|
|
|
|
stage: assign_test
|
2022-01-06 10:21:21 -05:00
|
|
|
tags:
|
|
|
|
- assign_test
|
2019-06-28 12:39:21 -04:00
|
|
|
variables:
|
2022-01-06 10:21:21 -05:00
|
|
|
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_component_ut:
|
|
|
|
extends:
|
|
|
|
- .assign_test_template
|
|
|
|
- .rules:build:component_ut
|
|
|
|
needs:
|
|
|
|
- job: build_component_ut_esp32
|
|
|
|
artifacts: false
|
|
|
|
optional: true
|
|
|
|
- job: build_component_ut_esp32s2
|
|
|
|
artifacts: false
|
|
|
|
optional: true
|
|
|
|
- job: build_component_ut_esp32c3
|
|
|
|
artifacts: false
|
|
|
|
optional: true
|
|
|
|
- job: build_component_ut_esp32s3
|
|
|
|
artifacts: false
|
|
|
|
optional: true
|
|
|
|
variables:
|
|
|
|
TEST_TYPE: component_ut
|
|
|
|
TEST_DIR: ${CI_PROJECT_DIR}/component_ut
|
|
|
|
BUILD_DIR: ${CI_PROJECT_DIR}/build_component_ut
|
|
|
|
script:
|
2020-09-26 23:20:53 -04:00
|
|
|
# COMPONENT_UT_DIRS is set by `set_component_ut_vars` in `utils.sh`
|
2022-01-06 10:21:21 -05:00
|
|
|
- set_component_ut_vars
|
|
|
|
- python tools/ci/python_packages/ttfw_idf/IDFAssignTest.py $TEST_TYPE $COMPONENT_UT_DIRS -c $CI_TARGET_TEST_CONFIG_FILE -o $TEST_DIR/test_configs
|
|
|
|
|
|
|
|
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
|
2022-01-06 10:42:48 -05:00
|
|
|
- build_ssc_esp32c3
|
2022-01-06 10:21:21 -05:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- $TEST_DIR/test_configs
|
|
|
|
variables:
|
2022-01-06 10:29:08 -05:00
|
|
|
TEST_DIR: ${CI_PROJECT_DIR}/tools/ci/integration_test
|
2022-01-06 10:21:21 -05:00
|
|
|
BUILD_DIR: ${CI_PROJECT_DIR}/SSC/ssc_bin
|
2020-10-23 21:21:17 -04:00
|
|
|
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
|
|
|
|
PYTHON_VER: 3.7.7
|
2019-06-28 12:39:21 -04:00
|
|
|
script:
|
|
|
|
# clone test script to assign tests
|
2020-10-23 21:21:17 -04:00
|
|
|
# can not retry if downing git lfs files failed, so using empty_branch first.
|
2020-09-26 23:20:53 -04:00
|
|
|
- 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}
|
2020-10-30 02:39:42 -04:00
|
|
|
- python $CHECKOUT_REF_SCRIPT auto_test_script auto_test_script --customized_only
|
2020-08-25 04:42:36 -04:00
|
|
|
# assign integration test cases
|
2022-01-06 10:21:21 -05:00
|
|
|
- python ${ASSIGN_TEST_CASE_SCRIPT} -t ${INTEGRATION_TEST_CASE_PATH} -c $CI_TARGET_TEST_CONFIG_FILE -b ${BUILD_DIR} -o $TEST_DIR/test_configs
|
2019-06-28 12:39:21 -04:00
|
|
|
|
|
|
|
update_test_cases:
|
2020-10-20 03:00:50 -04:00
|
|
|
extends: .rules:ref:master-schedule
|
2019-06-28 12:39:21 -04:00
|
|
|
stage: assign_test
|
|
|
|
image: $CI_DOCKER_REGISTRY/ubuntu-test-env
|
|
|
|
tags:
|
|
|
|
- deploy_test
|
2020-09-26 23:20:53 -04:00
|
|
|
needs:
|
2020-04-28 22:38:05 -04:00
|
|
|
- build_esp_idf_tests_cmake_esp32
|
|
|
|
- build_esp_idf_tests_cmake_esp32s2
|
2021-06-07 06:17:13 -04:00
|
|
|
- build_esp_idf_tests_cmake_esp32s3
|
2020-12-30 03:10:37 -05:00
|
|
|
- build_esp_idf_tests_cmake_esp32c3
|
2019-06-28 12:39:21 -04:00
|
|
|
artifacts:
|
|
|
|
when: always
|
|
|
|
paths:
|
|
|
|
- ${CI_PROJECT_DIR}/test-management/*.log
|
|
|
|
expire_in: 1 week
|
|
|
|
variables:
|
2019-11-28 04:08:25 -05:00
|
|
|
SUBMODULES_TO_FETCH: "components/esptool_py/esptool"
|
2020-09-26 23:20:53 -04:00
|
|
|
UNIT_TEST_DIR: "${CI_PROJECT_DIR}/components/idf_test/unit_test"
|
2019-06-28 12:39:21 -04:00
|
|
|
BOT_ACCOUNT_CONFIG_FILE: "${CI_PROJECT_DIR}/test-management/Config/Account.local.yml"
|
2022-01-06 10:42:48 -05:00
|
|
|
PYTHONPATH: ${CI_PROJECT_DIR}/auto_test_script/packages
|
2020-10-23 21:21:17 -04:00
|
|
|
PYTHON_VER: 3.7.7
|
2019-06-28 12:39:21 -04:00
|
|
|
script:
|
2021-10-28 00:07:02 -04:00
|
|
|
- export GIT_SHA=$(echo ${PIPELINE_COMMIT_SHA} | cut -c 1-8)
|
2020-09-28 02:27:10 -04:00
|
|
|
- retry_failed git clone $TEST_MANAGEMENT_REPO
|
2019-06-28 12:39:21 -04:00
|
|
|
- python $CHECKOUT_REF_SCRIPT test-management test-management
|
|
|
|
- cd test-management
|
|
|
|
- echo $BOT_JIRA_ACCOUNT > ${BOT_ACCOUNT_CONFIG_FILE}
|
|
|
|
# update unit test cases
|
2020-09-26 23:20:53 -04:00
|
|
|
- export UNIT_TEST_CASE_FILES=$(find $UNIT_TEST_DIR -maxdepth 1 -name "*.yml" | xargs)
|
2020-04-28 22:38:05 -04:00
|
|
|
- python ImportTestCase.py $JIRA_TEST_MANAGEMENT_PROJECT unity -d $UNIT_TEST_CASE_FILES -r $GIT_SHA
|
2019-06-28 12:39:21 -04:00
|
|
|
# update example test cases
|
|
|
|
- python ImportTestCase.py $JIRA_TEST_MANAGEMENT_PROJECT tiny_test_fw -d ${CI_PROJECT_DIR}/examples -r $GIT_SHA
|
2020-07-20 08:09:19 -04:00
|
|
|
- python ImportTestCase.py $JIRA_TEST_MANAGEMENT_PROJECT tiny_test_fw -d ${CI_PROJECT_DIR}/tools/test_apps -r $GIT_SHA
|
2019-06-28 12:39:21 -04:00
|
|
|
# organize test cases
|
|
|
|
- python OrganizeTestCases.py $JIRA_TEST_MANAGEMENT_PROJECT
|