2019-06-28 16:39:21 +00:00
|
|
|
|
|
|
|
assign_test:
|
|
|
|
tags:
|
|
|
|
- assign_test
|
|
|
|
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 artificats of build stage.
|
|
|
|
dependencies:
|
2019-12-20 02:52:33 +00:00
|
|
|
- build_ssc_esp32
|
2019-06-28 16:39:21 +00:00
|
|
|
- build_esp_idf_tests_cmake
|
|
|
|
variables:
|
2019-11-28 09:08:25 +00:00
|
|
|
SUBMODULES_TO_FETCH: "components/esptool_py/esptool"
|
2019-06-28 16:39:21 +00:00
|
|
|
EXAMPLE_CONFIG_OUTPUT_PATH: "$CI_PROJECT_DIR/examples/test_configs"
|
2019-08-18 05:22:50 +00:00
|
|
|
UNIT_TEST_CASE_FILE: "${CI_PROJECT_DIR}/components/idf_test/unit_test/TestCaseAll.yml"
|
2019-06-28 16:39:21 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- components/idf_test/*/CIConfigs
|
|
|
|
- components/idf_test/*/TC.sqlite
|
|
|
|
- $EXAMPLE_CONFIG_OUTPUT_PATH
|
2019-11-27 03:58:07 +00:00
|
|
|
- build_examples/artifact_index.json
|
2019-06-28 16:39:21 +00:00
|
|
|
expire_in: 1 week
|
|
|
|
only:
|
|
|
|
variables:
|
|
|
|
- $BOT_TRIGGER_WITH_LABEL == null
|
|
|
|
- $BOT_LABEL_UNIT_TEST
|
|
|
|
- $BOT_LABEL_INTEGRATION_TEST
|
|
|
|
- $BOT_LABEL_EXAMPLE_TEST
|
|
|
|
script:
|
|
|
|
# assign example tests
|
2019-11-27 03:58:07 +00:00
|
|
|
- python tools/ci/python_packages/ttfw_idf/CIAssignExampleTest.py $IDF_PATH/examples $CI_TARGET_TEST_CONFIG_FILE $EXAMPLE_CONFIG_OUTPUT_PATH
|
2019-06-28 16:39:21 +00:00
|
|
|
# assign unit test cases
|
2019-11-27 03:58:07 +00:00
|
|
|
- python tools/ci/python_packages/ttfw_idf/CIAssignUnitTest.py $UNIT_TEST_CASE_FILE $CI_TARGET_TEST_CONFIG_FILE $IDF_PATH/components/idf_test/unit_test/CIConfigs
|
2019-06-28 16:39:21 +00:00
|
|
|
# clone test script to assign tests
|
|
|
|
- git clone $TEST_SCRIPT_REPOSITORY
|
|
|
|
- python $CHECKOUT_REF_SCRIPT auto_test_script auto_test_script
|
|
|
|
- cd auto_test_script
|
|
|
|
# assgin integration test cases
|
|
|
|
- python CIAssignTestCases.py -t $IDF_PATH/components/idf_test/integration_test -c $CI_TARGET_TEST_CONFIG_FILE -b $IDF_PATH/SSC/ssc_bin
|
|
|
|
|
|
|
|
update_test_cases:
|
|
|
|
stage: assign_test
|
|
|
|
image: $CI_DOCKER_REGISTRY/ubuntu-test-env
|
|
|
|
tags:
|
|
|
|
- deploy_test
|
|
|
|
only:
|
|
|
|
refs:
|
|
|
|
- master
|
|
|
|
- schedules
|
|
|
|
dependencies:
|
|
|
|
- build_esp_idf_tests_make
|
|
|
|
- build_esp_idf_tests_cmake
|
|
|
|
artifacts:
|
|
|
|
when: always
|
|
|
|
paths:
|
|
|
|
- ${CI_PROJECT_DIR}/test-management/*.log
|
|
|
|
expire_in: 1 week
|
|
|
|
variables:
|
2019-11-28 09:08:25 +00:00
|
|
|
SUBMODULES_TO_FETCH: "components/esptool_py/esptool"
|
2019-06-28 16:39:21 +00:00
|
|
|
UNIT_TEST_CASE_FILE: "${CI_PROJECT_DIR}/components/idf_test/unit_test/TestCaseAll.yml"
|
|
|
|
BOT_ACCOUNT_CONFIG_FILE: "${CI_PROJECT_DIR}/test-management/Config/Account.local.yml"
|
|
|
|
AUTO_TEST_SCRIPT_PATH: "${CI_PROJECT_DIR}/auto_test_script"
|
|
|
|
PYTHON_VER: 3
|
|
|
|
script:
|
|
|
|
- export GIT_SHA=$(echo ${CI_COMMIT_SHA} | cut -c 1-8)
|
|
|
|
- git clone $TEST_MANAGEMENT_REPO
|
|
|
|
- python $CHECKOUT_REF_SCRIPT test-management test-management
|
|
|
|
- cd test-management
|
|
|
|
- echo $BOT_JIRA_ACCOUNT > ${BOT_ACCOUNT_CONFIG_FILE}
|
|
|
|
# update unit test cases
|
|
|
|
- python ImportTestCase.py $JIRA_TEST_MANAGEMENT_PROJECT unity -d $UNIT_TEST_CASE_FILE -r $GIT_SHA
|
|
|
|
# update example test cases
|
|
|
|
- python ImportTestCase.py $JIRA_TEST_MANAGEMENT_PROJECT tiny_test_fw -d ${CI_PROJECT_DIR}/examples -r $GIT_SHA
|
|
|
|
# organize test cases
|
|
|
|
- python OrganizeTestCases.py $JIRA_TEST_MANAGEMENT_PROJECT
|