2016-08-22 10:19:08 +00:00
|
|
|
stages:
|
|
|
|
- build
|
2016-11-01 11:30:42 +00:00
|
|
|
- unit_test
|
2016-08-23 04:54:09 +00:00
|
|
|
- test
|
2016-10-17 09:03:54 +00:00
|
|
|
- test_report
|
2016-08-22 10:19:08 +00:00
|
|
|
- deploy
|
|
|
|
|
2016-09-01 07:13:15 +00:00
|
|
|
before_script:
|
2016-09-13 01:34:28 +00:00
|
|
|
# add gitlab ssh key
|
|
|
|
- mkdir -p ~/.ssh
|
|
|
|
- chmod 700 ~/.ssh
|
2016-09-13 13:24:57 +00:00
|
|
|
- echo -n $GITLAB_KEY > ~/.ssh/id_rsa_base64
|
2016-09-13 01:34:28 +00:00
|
|
|
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
|
|
|
|
- chmod 600 ~/.ssh/id_rsa
|
|
|
|
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
|
2016-11-08 03:55:48 +00:00
|
|
|
|
2017-03-22 10:39:28 +00:00
|
|
|
# Set IS_PRIVATE or IS_PUBLIC depending on if our branch is public or not
|
|
|
|
#
|
|
|
|
# (the same regular expressions are used to set these are used in 'only:' sections below
|
|
|
|
- source make/configure_ci_environment.sh
|
|
|
|
|
2016-09-13 01:34:28 +00:00
|
|
|
# fetch all submodules
|
2016-09-01 07:13:15 +00:00
|
|
|
- git submodule update --init --recursive
|
|
|
|
|
2016-08-22 07:02:22 +00:00
|
|
|
build_template_app:
|
2016-08-22 10:19:08 +00:00
|
|
|
stage: build
|
2017-03-22 13:59:40 +00:00
|
|
|
image: $CI_DOCKER_REGISTRY/esp32-ci-env
|
2016-09-09 02:49:03 +00:00
|
|
|
tags:
|
|
|
|
- build
|
2016-08-22 07:02:22 +00:00
|
|
|
|
|
|
|
variables:
|
|
|
|
IDF_PATH: "$CI_PROJECT_DIR"
|
2016-08-22 10:19:08 +00:00
|
|
|
GIT_STRATEGY: clone
|
2017-02-10 06:38:24 +00:00
|
|
|
BATCH_BUILD: "1"
|
2016-10-05 05:32:09 +00:00
|
|
|
IDF_CI_BUILD: "1"
|
2016-08-22 07:02:22 +00:00
|
|
|
|
|
|
|
script:
|
|
|
|
- git clone https://github.com/espressif/esp-idf-template.git
|
|
|
|
- cd esp-idf-template
|
2016-09-01 08:58:06 +00:00
|
|
|
# Try to use the same branch name for esp-idf-template that we're
|
|
|
|
# using on esp-idf. If it doesn't exist then just stick to the default
|
|
|
|
# branch
|
|
|
|
- git checkout ${CI_BUILD_REF_NAME} || echo "Using esp-idf-template default branch..."
|
2016-10-17 04:45:42 +00:00
|
|
|
# Test debug build (default)
|
|
|
|
- make all V=1
|
|
|
|
# Now test release build
|
|
|
|
- make clean
|
|
|
|
- sed -i.bak -e's/CONFIG_OPTIMIZATION_LEVEL_DEBUG\=y/CONFIG_OPTIMIZATION_LEVEL_RELEASE=y/' sdkconfig
|
2016-09-09 00:49:35 +00:00
|
|
|
- make all V=1
|
2016-11-21 15:05:23 +00:00
|
|
|
# Check if there are any stray printf/ets_printf references in WiFi libs
|
|
|
|
- cd ../components/esp32/lib
|
|
|
|
- test $(xtensa-esp32-elf-nm *.a | grep -w printf | wc -l) -eq 0
|
|
|
|
- test $(xtensa-esp32-elf-nm *.a | grep -w ets_printf | wc -l) -eq 0
|
2016-08-22 10:19:08 +00:00
|
|
|
|
2016-09-09 02:49:03 +00:00
|
|
|
|
2017-04-26 10:09:14 +00:00
|
|
|
.build_template: &build_template
|
2016-09-09 02:49:03 +00:00
|
|
|
stage: build
|
2017-04-26 10:09:14 +00:00
|
|
|
image: $CI_DOCKER_REGISTRY/esp32-ci-env
|
2016-09-09 02:49:03 +00:00
|
|
|
tags:
|
|
|
|
- build
|
|
|
|
|
|
|
|
variables:
|
|
|
|
IDF_PATH: "$CI_PROJECT_DIR"
|
|
|
|
GIT_STRATEGY: clone
|
2017-02-10 06:38:24 +00:00
|
|
|
BATCH_BUILD: "1"
|
2017-04-20 03:43:20 +00:00
|
|
|
V: "0"
|
2016-09-09 02:49:03 +00:00
|
|
|
|
|
|
|
build_ssc:
|
|
|
|
<<: *build_template
|
|
|
|
artifacts:
|
|
|
|
paths:
|
2016-11-17 06:02:46 +00:00
|
|
|
- ./SSC/ssc_bin
|
2016-09-09 02:49:03 +00:00
|
|
|
expire_in: 6 mos
|
|
|
|
|
|
|
|
script:
|
2016-09-28 12:11:42 +00:00
|
|
|
- git clone $GITLAB_SSH_SERVER/yinling/SSC.git
|
2016-09-09 02:49:03 +00:00
|
|
|
- cd SSC
|
2016-09-29 05:38:29 +00:00
|
|
|
- git checkout ${CI_BUILD_REF_NAME} || echo "Using SSC default branch..."
|
2016-09-09 02:49:03 +00:00
|
|
|
- make defconfig
|
|
|
|
- ./gen_misc_ng.sh
|
|
|
|
|
2017-01-24 07:05:39 +00:00
|
|
|
build_at:
|
|
|
|
<<: *build_template
|
|
|
|
script:
|
|
|
|
- git clone $GITLAB_SSH_SERVER/application/esp-at.git
|
|
|
|
- cd esp-at
|
|
|
|
- git checkout ${CI_BUILD_REF_NAME} || echo "Using esp-at default branch..."
|
|
|
|
- make defconfig
|
|
|
|
- make
|
|
|
|
|
2016-11-01 11:30:42 +00:00
|
|
|
build_esp_idf_tests:
|
|
|
|
<<: *build_template
|
|
|
|
artifacts:
|
|
|
|
paths:
|
2016-11-17 08:36:10 +00:00
|
|
|
- ./tools/unit-test-app/build/*.bin
|
|
|
|
- ./tools/unit-test-app/build/*.elf
|
|
|
|
- ./tools/unit-test-app/build/*.map
|
2017-04-18 14:38:08 +00:00
|
|
|
- ./tools/unit-test-app/build/download.config
|
2016-11-17 08:36:10 +00:00
|
|
|
- ./tools/unit-test-app/build/bootloader/*.bin
|
2016-12-07 05:58:51 +00:00
|
|
|
- ./components/idf_test/unit_test/TestCaseAll.yml
|
|
|
|
- ./components/idf_test/unit_test/CIConfigs/*.yml
|
2016-11-01 11:30:42 +00:00
|
|
|
expire_in: 6 mos
|
|
|
|
|
|
|
|
script:
|
2016-11-17 08:36:10 +00:00
|
|
|
- cd tools/unit-test-app
|
2016-11-23 06:22:49 +00:00
|
|
|
- make TESTS_ALL=1
|
2017-04-18 14:38:08 +00:00
|
|
|
# cut last line in case make V=0/1 is set by default
|
|
|
|
- make print_flash_cmd | tail -n 1 > build/download.config
|
2017-03-24 10:38:06 +00:00
|
|
|
- python tools/UnitTestParser.py
|
2016-11-01 11:30:42 +00:00
|
|
|
|
2016-10-11 05:41:05 +00:00
|
|
|
build_examples:
|
|
|
|
<<: *build_template
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- build_examples/*/*/build/*.bin
|
|
|
|
- build_examples/*/*/build/*.elf
|
|
|
|
- build_examples/*/*/build/*.map
|
|
|
|
- build_examples/*/*/build/bootloader/*.bin
|
|
|
|
expire_in: 6 mos
|
|
|
|
|
|
|
|
script:
|
|
|
|
# it's not possible to build 100% out-of-tree and have the "artifacts"
|
|
|
|
# mechanism work, but this is the next best thing
|
|
|
|
- mkdir build_examples
|
|
|
|
- cd build_examples
|
|
|
|
- ${IDF_PATH}/make/build_examples.sh
|
|
|
|
|
2016-11-01 12:08:29 +00:00
|
|
|
build_docs:
|
|
|
|
stage: build
|
2017-03-22 13:59:40 +00:00
|
|
|
image: $CI_DOCKER_REGISTRY/esp32-ci-env
|
2016-11-01 12:08:29 +00:00
|
|
|
tags:
|
|
|
|
- build_docs
|
|
|
|
script:
|
|
|
|
- cd docs
|
2016-11-15 17:35:09 +00:00
|
|
|
- doxygen
|
|
|
|
# If not building master branch, and there are Doxygen warnings, print them and bail out
|
2017-03-22 10:39:28 +00:00
|
|
|
- test -n $IS_PRIVATE && test $(cat doxygen-warning-log.txt | wc -l) -eq 0 || ( echo "Doxygen pass had some warnings:" && cat doxygen-warning-log.txt && false )
|
2017-01-19 08:16:06 +00:00
|
|
|
- make gh-linkcheck
|
2016-11-01 12:08:29 +00:00
|
|
|
- make html
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- docs/_build/html
|
2016-11-01 12:58:47 +00:00
|
|
|
expire_in: 1 mos
|
2016-11-01 12:08:29 +00:00
|
|
|
|
2016-08-23 04:54:09 +00:00
|
|
|
test_nvs_on_host:
|
|
|
|
stage: test
|
2017-03-22 13:59:40 +00:00
|
|
|
image: $CI_DOCKER_REGISTRY/esp32-ci-env
|
2016-09-09 02:49:03 +00:00
|
|
|
tags:
|
|
|
|
- nvs_host_test
|
2016-08-23 04:54:09 +00:00
|
|
|
script:
|
2016-11-17 08:36:10 +00:00
|
|
|
- cd components/nvs_flash/test_nvs_host
|
2016-08-23 04:54:09 +00:00
|
|
|
- make test
|
|
|
|
|
2017-05-12 02:30:27 +00:00
|
|
|
test_partition_table_on_host:
|
|
|
|
stage: test
|
|
|
|
image: $CI_DOCKER_REGISTRY/esp32-ci-env
|
|
|
|
tags:
|
|
|
|
- build
|
|
|
|
script:
|
|
|
|
- cd components/partition_table/test_gen_esp32part_host
|
|
|
|
- ./gen_esp32part_tests.py
|
|
|
|
|
2017-04-10 13:41:19 +00:00
|
|
|
test_wl_on_host:
|
|
|
|
stage: test
|
|
|
|
image: $CI_DOCKER_REGISTRY/esp32-ci-env
|
|
|
|
tags:
|
|
|
|
- wl_host_test
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- components/wear_levelling/test_wl_host/coverage_report.zip
|
|
|
|
script:
|
|
|
|
- cd components/wear_levelling/test_wl_host
|
|
|
|
- make test
|
|
|
|
|
2016-08-24 04:16:26 +00:00
|
|
|
test_build_system:
|
|
|
|
stage: test
|
2017-03-22 13:59:40 +00:00
|
|
|
image: $CI_DOCKER_REGISTRY/esp32-ci-env
|
2016-09-09 02:49:03 +00:00
|
|
|
tags:
|
|
|
|
- build_test
|
2016-08-24 05:31:33 +00:00
|
|
|
variables:
|
|
|
|
IDF_PATH: "$CI_PROJECT_DIR"
|
2016-08-24 04:16:26 +00:00
|
|
|
script:
|
2017-03-22 10:39:28 +00:00
|
|
|
- ./make/test_configure_ci_environment.sh
|
2016-08-25 03:55:47 +00:00
|
|
|
- ./make/test_build_system.sh
|
2016-08-24 04:16:26 +00:00
|
|
|
|
2016-09-30 05:58:02 +00:00
|
|
|
test_report:
|
2016-10-17 09:03:54 +00:00
|
|
|
stage: test_report
|
2017-03-22 13:59:40 +00:00
|
|
|
image: $CI_DOCKER_REGISTRY/esp32-ci-env
|
2017-04-26 10:09:14 +00:00
|
|
|
tags:
|
|
|
|
- report
|
2016-09-30 05:58:02 +00:00
|
|
|
only:
|
|
|
|
- master
|
|
|
|
- triggers
|
2017-03-22 10:25:28 +00:00
|
|
|
- /^release\/v/
|
|
|
|
- /^v\d+\.\d+(\.\d+)?($|-)/
|
2016-09-30 05:58:02 +00:00
|
|
|
variables:
|
|
|
|
LOG_PATH: "$CI_PROJECT_DIR/$CI_BUILD_REF"
|
2016-10-12 03:17:56 +00:00
|
|
|
TEST_CASE_FILE_PATH: "$CI_PROJECT_DIR/components/idf_test"
|
2016-09-30 05:58:02 +00:00
|
|
|
REPORT_PATH: "$CI_PROJECT_DIR/CI_Test_Report"
|
2017-04-25 07:10:32 +00:00
|
|
|
MODULE_UPDATE_FILE: "$CI_PROJECT_DIR/tools/unit-test-app/tools/ModuleDefinition.yml"
|
2016-09-30 05:58:02 +00:00
|
|
|
artifacts:
|
|
|
|
when: always
|
|
|
|
paths:
|
|
|
|
- $REPORT_PATH
|
2016-11-17 05:45:53 +00:00
|
|
|
- $LOG_PATH
|
2016-10-17 09:03:54 +00:00
|
|
|
expire_in: 12 mos
|
2016-09-30 05:58:02 +00:00
|
|
|
script:
|
2016-11-24 03:46:58 +00:00
|
|
|
# calc log path
|
|
|
|
- VER_NUM=`git rev-list HEAD | wc -l | awk '{print $1}'`
|
|
|
|
- SHA_ID=`echo $CI_BUILD_REF | cut -c 1-7`
|
|
|
|
- REVISION="${VER_NUM}_${SHA_ID}"
|
|
|
|
# replace / to _ in branch name
|
|
|
|
- ESCAPED_BRANCH_NAME=`echo $CI_BUILD_REF_NAME | sed 's/\//___/g'`
|
|
|
|
# result path and artifacts path
|
|
|
|
- RESULT_PATH="$CI_PROJECT_NAME/$ESCAPED_BRANCH_NAME/$REVISION"
|
|
|
|
- ARTIFACTS_PATH="$GITLAB_HTTP_SERVER/idf/esp-idf/builds/$CI_BUILD_ID/artifacts/browse/$CI_BUILD_REF"
|
2016-09-30 05:58:02 +00:00
|
|
|
# clone test bench
|
|
|
|
- git clone $GITLAB_SSH_SERVER/yinling/auto_test_script.git
|
|
|
|
- cd auto_test_script
|
|
|
|
# generate report
|
2017-01-19 15:37:12 +00:00
|
|
|
- TEST_RESULT=Pass
|
|
|
|
- python CITestReport.py -l $LOG_PATH -t $TEST_CASE_FILE_PATH -p $REPORT_PATH -r $RESULT_PATH -a $ARTIFACTS_PATH -m $MODULE_UPDATE_FILE || TEST_RESULT=Fail
|
2016-11-24 03:46:58 +00:00
|
|
|
# commit to CI-test-result project
|
|
|
|
- git clone $GITLAB_SSH_SERVER/qa/CI-test-result.git
|
|
|
|
- rm -rf CI-test-result/RawData/$RESULT_PATH
|
|
|
|
- cp -R $CI_PROJECT_NAME CI-test-result/RawData
|
|
|
|
- cd CI-test-result
|
|
|
|
# config git user
|
|
|
|
- git config --global user.email "ci-test-result@espressif.com"
|
|
|
|
- git config --global user.name "ci-test-result"
|
|
|
|
# commit test result
|
|
|
|
- git add .
|
|
|
|
- git commit . -m "update test result for $CI_PROJECT_NAME/$CI_BUILD_REF_NAME/$CI_BUILD_REF, pipeline ID $CI_PIPELINE_ID" || exit 0
|
|
|
|
- git push origin master
|
2017-01-02 08:25:26 +00:00
|
|
|
- test "${TEST_RESULT}" = "Pass" || exit 1
|
2016-09-09 02:49:03 +00:00
|
|
|
|
2016-09-26 06:32:58 +00:00
|
|
|
push_master_to_github:
|
|
|
|
before_script:
|
|
|
|
- echo "Not setting up GitLab key, not fetching submodules"
|
|
|
|
stage: deploy
|
2017-04-26 10:09:14 +00:00
|
|
|
image: $CI_DOCKER_REGISTRY/esp32-ci-env
|
|
|
|
tags:
|
|
|
|
- deploy
|
2016-09-26 06:32:58 +00:00
|
|
|
only:
|
|
|
|
- master
|
2017-03-22 10:25:28 +00:00
|
|
|
- /^release\/v/
|
|
|
|
- /^v\d+\.\d+(\.\d+)?($|-)/
|
2016-09-26 06:32:58 +00:00
|
|
|
when: on_success
|
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: clone
|
2017-03-14 09:27:56 +00:00
|
|
|
GITHUB_PUSH_REFS: refs/remotes/origin/release refs/remotes/origin/master
|
2016-09-26 06:32:58 +00:00
|
|
|
script:
|
|
|
|
- mkdir -p ~/.ssh
|
|
|
|
- chmod 700 ~/.ssh
|
|
|
|
- echo -n $GH_PUSH_KEY > ~/.ssh/id_rsa_base64
|
|
|
|
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
|
|
|
|
- chmod 600 ~/.ssh/id_rsa
|
|
|
|
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
|
|
|
|
- git remote add github git@github.com:espressif/esp-idf.git
|
2017-03-14 09:27:56 +00:00
|
|
|
# What the next line of script does: goes through the list of refs for all branches we push to github,
|
|
|
|
# generates a snippet of shell which is evaluated. The snippet checks CI_BUILD_REF against the SHA
|
|
|
|
# (aka objectname) at tip of each branch, and if any SHAs match then it checks out the local branch
|
|
|
|
# and then pushes that ref to a corresponding github branch
|
|
|
|
#
|
|
|
|
# NB: In gitlab 9.x, CI_BUILD_REF was deprecated. New name is CI_COMMIT_REF. If below command suddenly
|
|
|
|
# generates bash syntax errors, this is probably why.
|
2017-03-17 04:00:25 +00:00
|
|
|
- eval $(git for-each-ref --shell bash --format 'if [ $CI_BUILD_REF == %(objectname) ]; then git checkout -B %(refname:strip=3); git push --follow-tags github %(refname:strip=3); fi;' $GITHUB_PUSH_REFS)
|
2016-09-09 02:49:03 +00:00
|
|
|
|
2016-09-26 06:32:58 +00:00
|
|
|
|
2016-11-01 12:58:47 +00:00
|
|
|
deploy_docs:
|
|
|
|
before_script:
|
|
|
|
- echo "Not setting up GitLab key, not fetching submodules"
|
|
|
|
stage: deploy
|
2017-04-26 10:09:14 +00:00
|
|
|
image: $CI_DOCKER_REGISTRY/esp32-ci-env
|
|
|
|
tags:
|
|
|
|
- deploy
|
2016-11-01 12:58:47 +00:00
|
|
|
only:
|
|
|
|
- master
|
2017-03-22 10:25:28 +00:00
|
|
|
- /^release\/v/
|
|
|
|
- /^v\d+\.\d+(\.\d+)?($|-)/
|
2016-11-01 12:58:47 +00:00
|
|
|
- triggers
|
|
|
|
script:
|
|
|
|
- mkdir -p ~/.ssh
|
|
|
|
- chmod 700 ~/.ssh
|
|
|
|
- echo -n $DOCS_DEPLOY_KEY > ~/.ssh/id_rsa_base64
|
|
|
|
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
|
|
|
|
- chmod 600 ~/.ssh/id_rsa
|
|
|
|
- echo -e "Host $DOCS_SERVER\n\tStrictHostKeyChecking no\n\tUser $DOCS_SERVER_USER\n" >> ~/.ssh/config
|
|
|
|
- export GIT_VER=$(git describe --always)
|
|
|
|
- cd docs/_build/
|
|
|
|
- mv html $GIT_VER
|
|
|
|
- tar czvf $GIT_VER.tar.gz $GIT_VER
|
|
|
|
- scp $GIT_VER.tar.gz $DOCS_SERVER:$DOCS_PATH
|
|
|
|
- ssh $DOCS_SERVER -x "cd $DOCS_PATH && tar xzvf $GIT_VER.tar.gz && rm -f latest && ln -s $GIT_VER latest"
|
|
|
|
|
2017-01-19 08:16:06 +00:00
|
|
|
check_doc_links:
|
|
|
|
stage: test
|
2017-03-22 13:59:40 +00:00
|
|
|
image: $CI_DOCKER_REGISTRY/esp32-ci-env
|
2017-01-19 08:16:06 +00:00
|
|
|
tags:
|
|
|
|
- check_doc_links
|
|
|
|
only:
|
|
|
|
# can only be triggered
|
|
|
|
- triggers
|
|
|
|
script:
|
|
|
|
# must be triggered with CHECK_LINKS=Yes, otherwise exit without test
|
2017-03-04 10:17:59 +00:00
|
|
|
- test "$CHECK_LINKS" = "Yes" || exit 0
|
2017-01-19 08:16:06 +00:00
|
|
|
# can only run on master branch (otherwise the commit is not on Github yet)
|
|
|
|
- test "${CI_BUILD_REF_NAME}" = "master" || exit 0
|
|
|
|
- cd docs
|
|
|
|
- make linkcheck
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- docs/_build/linkcheck
|
|
|
|
expire_in: 1 mos
|
|
|
|
|
2017-03-31 10:52:59 +00:00
|
|
|
check_commit_msg:
|
|
|
|
stage: deploy
|
|
|
|
image: $CI_DOCKER_REGISTRY/esp32-ci-env
|
|
|
|
tags:
|
|
|
|
- build
|
|
|
|
except:
|
|
|
|
- master
|
|
|
|
- /^release\/v/
|
|
|
|
- /^v\d+\.\d+(\.\d+)?($|-)/
|
|
|
|
before_script:
|
|
|
|
- echo "skip update submodule"
|
|
|
|
script:
|
|
|
|
- git checkout ${CI_BUILD_REF_NAME}
|
|
|
|
# commit start with "WIP: " need to be squashed before merge
|
|
|
|
- 'git log --pretty=%s master..${CI_BUILD_REF_NAME} | grep "^WIP: " || exit 0 && exit 1'
|
2016-11-01 12:58:47 +00:00
|
|
|
|
2016-09-09 02:49:03 +00:00
|
|
|
# template for test jobs
|
|
|
|
.test_template: &test_template
|
|
|
|
stage: test
|
|
|
|
when: on_success
|
|
|
|
only:
|
|
|
|
- master
|
2017-03-22 10:25:28 +00:00
|
|
|
- /^release\/v/
|
|
|
|
- /^v\d+\.\d+(\.\d+)?($|-)/
|
2016-09-18 15:12:50 +00:00
|
|
|
- triggers
|
2016-09-30 08:11:24 +00:00
|
|
|
allow_failure: true
|
2016-09-09 02:49:03 +00:00
|
|
|
|
|
|
|
variables:
|
2017-02-02 13:59:00 +00:00
|
|
|
LOCAL_ENV_CONFIG_PATH: $CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/ESP32_IDF
|
2016-11-17 06:02:46 +00:00
|
|
|
BIN_PATH: "$CI_PROJECT_DIR/SSC/ssc_bin/SSC"
|
2016-09-26 06:32:58 +00:00
|
|
|
APP_NAME: "ssc"
|
|
|
|
LOG_PATH: "$CI_PROJECT_DIR/$CI_BUILD_REF"
|
2016-10-12 03:17:56 +00:00
|
|
|
# append test level folder to TEST_CASE_FILE_PATH in before_script of test job
|
2016-11-01 11:30:42 +00:00
|
|
|
TEST_CASE_FILE_PATH: "$CI_PROJECT_DIR/components/idf_test/integration_test"
|
2016-09-26 06:32:58 +00:00
|
|
|
# jobs MUST set CONFIG_FILE in before_script, and overwrite the variables above if necessary
|
2017-04-25 07:10:32 +00:00
|
|
|
MODULE_UPDATE_FILE: "$CI_PROJECT_DIR/tools/unit-test-app/tools/ModuleDefinition.yml"
|
2016-09-26 06:32:58 +00:00
|
|
|
|
2016-09-09 02:49:03 +00:00
|
|
|
artifacts:
|
|
|
|
when: always
|
|
|
|
paths:
|
|
|
|
- $LOG_PATH
|
|
|
|
expire_in: 6 mos
|
2016-09-26 06:32:58 +00:00
|
|
|
|
|
|
|
script:
|
2016-12-06 08:22:33 +00:00
|
|
|
# remove artifacts from last stage (UT logs)
|
2016-12-12 01:31:06 +00:00
|
|
|
- rm -rf $LOG_PATH
|
2016-09-29 05:38:29 +00:00
|
|
|
# add gitlab ssh key
|
|
|
|
- mkdir -p ~/.ssh
|
|
|
|
- chmod 700 ~/.ssh
|
|
|
|
- echo -n $GITLAB_KEY > ~/.ssh/id_rsa_base64
|
|
|
|
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
|
|
|
|
- chmod 600 ~/.ssh/id_rsa
|
|
|
|
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
|
2017-02-02 13:59:00 +00:00
|
|
|
# clone local test env configs
|
|
|
|
- git clone $GITLAB_SSH_SERVER/qa/ci-test-runner-configs.git
|
2016-09-29 05:38:29 +00:00
|
|
|
# clone test bench
|
2016-09-28 11:48:38 +00:00
|
|
|
- git clone $GITLAB_SSH_SERVER/yinling/auto_test_script.git
|
2016-09-27 08:22:18 +00:00
|
|
|
- cd auto_test_script
|
2016-09-29 05:38:29 +00:00
|
|
|
# run test
|
2016-12-07 05:58:51 +00:00
|
|
|
- python CIRunner.py -l $LOG_PATH -c $CONFIG_FILE -e $LOCAL_ENV_CONFIG_PATH -t $TEST_CASE_FILE_PATH -m $MODULE_UPDATE_FILE bin_path $APP_NAME $BIN_PATH
|
2016-09-26 06:32:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
# template for overnight test jobs
|
|
|
|
.test_template_night: &test_template_night
|
|
|
|
<<: *test_template
|
|
|
|
only:
|
|
|
|
# can only be triggered
|
|
|
|
- triggers
|
2016-09-09 02:49:03 +00:00
|
|
|
script:
|
2016-12-06 08:22:33 +00:00
|
|
|
# remove artifacts from last stage (UT logs)
|
2016-12-12 01:31:06 +00:00
|
|
|
- rm -rf $LOG_PATH
|
2016-09-26 06:32:58 +00:00
|
|
|
# must be night build triggers, otherwise exit without test
|
2016-09-29 12:21:33 +00:00
|
|
|
- test $NIGHT_BUILD = "Yes" || exit 0
|
2016-09-29 05:38:29 +00:00
|
|
|
# add gitlab ssh key
|
|
|
|
- mkdir -p ~/.ssh
|
|
|
|
- chmod 700 ~/.ssh
|
|
|
|
- echo -n $GITLAB_KEY > ~/.ssh/id_rsa_base64
|
|
|
|
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
|
|
|
|
- chmod 600 ~/.ssh/id_rsa
|
|
|
|
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
|
2017-02-02 13:59:00 +00:00
|
|
|
# clone local test env configs
|
|
|
|
- git clone $GITLAB_SSH_SERVER/qa/ci-test-runner-configs.git
|
2016-09-29 05:38:29 +00:00
|
|
|
# clone test bench
|
2016-09-28 11:48:38 +00:00
|
|
|
- git clone $GITLAB_SSH_SERVER/yinling/auto_test_script.git
|
2016-09-27 08:22:18 +00:00
|
|
|
- cd auto_test_script
|
2016-09-29 05:38:29 +00:00
|
|
|
# run test
|
2016-12-07 05:58:51 +00:00
|
|
|
- python CIRunner.py -l $LOG_PATH -c $CONFIG_FILE -e $LOCAL_ENV_CONFIG_PATH -t $TEST_CASE_FILE_PATH -m $MODULE_UPDATE_FILE bin_path $APP_NAME $BIN_PATH
|
2016-09-26 06:32:58 +00:00
|
|
|
|
2016-11-01 11:30:42 +00:00
|
|
|
# template for unit test jobs
|
|
|
|
.unit_test_template: &unit_test_template
|
|
|
|
<<: *test_template
|
|
|
|
allow_failure: false
|
|
|
|
stage: unit_test
|
|
|
|
|
|
|
|
variables:
|
2017-02-02 13:59:00 +00:00
|
|
|
LOCAL_ENV_CONFIG_PATH: $CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/ESP32_IDF
|
2016-11-23 06:22:49 +00:00
|
|
|
BIN_PATH: "$CI_PROJECT_DIR/tools/unit-test-app/build/"
|
2016-11-01 11:30:42 +00:00
|
|
|
LOG_PATH: "$CI_PROJECT_DIR/$CI_BUILD_REF"
|
|
|
|
APP_NAME: "ut"
|
|
|
|
TEST_CASE_FILE_PATH: "$CI_PROJECT_DIR/components/idf_test/unit_test"
|
2017-03-24 10:38:06 +00:00
|
|
|
MODULE_UPDATE_FILE: "$CI_PROJECT_DIR/tools/unit-test-app/tools/ModuleDefinition.yml"
|
2016-12-07 05:58:51 +00:00
|
|
|
|
|
|
|
dependencies:
|
|
|
|
- build_esp_idf_tests
|
2016-11-01 11:30:42 +00:00
|
|
|
|
|
|
|
UT_Function_SYS_01:
|
2016-11-01 12:33:23 +00:00
|
|
|
<<: *unit_test_template
|
2016-11-01 11:30:42 +00:00
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
|
|
|
- UT_T1_1
|
|
|
|
before_script:
|
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/UT_Function_SYS_01.yml
|
|
|
|
|
2016-12-07 05:58:51 +00:00
|
|
|
UT_Function_SYS_02:
|
|
|
|
<<: *unit_test_template
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
|
|
|
- UT_T1_1
|
|
|
|
before_script:
|
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/UT_Function_SYS_02.yml
|
|
|
|
|
2016-10-12 03:17:56 +00:00
|
|
|
IT_Function_SYS_01:
|
2016-09-26 06:32:58 +00:00
|
|
|
<<: *test_template
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
|
|
|
- SSC_T1_1
|
|
|
|
before_script:
|
2016-10-12 03:44:54 +00:00
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_SYS_01.yml
|
2016-09-09 02:49:03 +00:00
|
|
|
|
2016-10-12 03:17:56 +00:00
|
|
|
IT_Function_WIFI_01:
|
2016-09-09 02:49:03 +00:00
|
|
|
<<: *test_template
|
|
|
|
tags:
|
2016-09-26 06:32:58 +00:00
|
|
|
- ESP32_IDF
|
2016-09-09 02:49:03 +00:00
|
|
|
- SSC_T1_1
|
|
|
|
- SSC_T2_1
|
|
|
|
before_script:
|
2016-10-12 03:44:54 +00:00
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_WIFI_01.yml
|
2016-09-09 02:49:03 +00:00
|
|
|
|
2016-10-12 03:17:56 +00:00
|
|
|
IT_Function_WIFI_02:
|
2016-09-26 06:32:58 +00:00
|
|
|
<<: *test_template
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
|
|
|
- SSC_T1_1
|
|
|
|
- SSC_T2_1
|
|
|
|
before_script:
|
2016-10-12 03:44:54 +00:00
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_WIFI_02.yml
|
2016-09-09 02:49:03 +00:00
|
|
|
|
2016-10-12 03:17:56 +00:00
|
|
|
IT_Function_TCPIP_01:
|
2016-09-26 06:32:58 +00:00
|
|
|
<<: *test_template
|
2016-09-09 02:49:03 +00:00
|
|
|
tags:
|
2016-09-26 06:32:58 +00:00
|
|
|
- ESP32_IDF
|
|
|
|
- SSC_T1_1
|
|
|
|
- SSC_T2_1
|
|
|
|
before_script:
|
2016-10-12 03:44:54 +00:00
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_01.yml
|
2016-09-26 06:32:58 +00:00
|
|
|
|
2016-10-12 03:17:56 +00:00
|
|
|
IT_Function_TCPIP_02:
|
2016-09-26 06:32:58 +00:00
|
|
|
<<: *test_template
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
|
|
|
- SSC_T1_1
|
|
|
|
before_script:
|
2016-10-12 03:44:54 +00:00
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_02.yml
|
2016-09-26 06:32:58 +00:00
|
|
|
|
2016-10-12 03:17:56 +00:00
|
|
|
IT_Function_TCPIP_03:
|
2016-09-26 06:32:58 +00:00
|
|
|
<<: *test_template
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
|
|
|
- SSC_T1_1
|
|
|
|
- SSC_T2_1
|
|
|
|
before_script:
|
2016-10-12 03:44:54 +00:00
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_03.yml
|
2016-09-26 06:32:58 +00:00
|
|
|
|
2016-10-12 03:17:56 +00:00
|
|
|
IT_Function_TCPIP_04:
|
2016-09-26 06:32:58 +00:00
|
|
|
<<: *test_template
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
|
|
|
- SSC_T1_1
|
|
|
|
- SSC_T2_1
|
|
|
|
before_script:
|
2016-10-12 03:44:54 +00:00
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_04.yml
|
2016-09-26 06:32:58 +00:00
|
|
|
|
2016-10-12 03:17:56 +00:00
|
|
|
IT_Function_TCPIP_05:
|
2016-09-26 06:32:58 +00:00
|
|
|
<<: *test_template
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
|
|
|
- SSC_T1_1
|
|
|
|
before_script:
|
2016-10-12 03:44:54 +00:00
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_05.yml
|
2016-09-26 06:32:58 +00:00
|
|
|
|
2016-12-06 07:41:02 +00:00
|
|
|
IT_Stress_WIFI_01:
|
|
|
|
<<: *test_template_night
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
|
|
|
- SSC_T5_1
|
|
|
|
before_script:
|
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Stress_WIFI_01.yml
|
|
|
|
|
|
|
|
IT_Stress_TCPIP_01:
|
|
|
|
<<: *test_template_night
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
|
|
|
- SSC_T1_1
|
|
|
|
before_script:
|
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Stress_TCPIP_01.yml
|
|
|
|
|
|
|
|
IT_Stress_TCPIP_02:
|
|
|
|
<<: *test_template_night
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
|
|
|
- SSC_T2_1
|
|
|
|
before_script:
|
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Stress_TCPIP_02.yml
|
|
|
|
|
|
|
|
IT_Stress_TCPIP_03:
|
|
|
|
<<: *test_template_night
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
|
|
|
- SSC_T1_1
|
|
|
|
before_script:
|
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Stress_TCPIP_03.yml
|
|
|
|
|
|
|
|
IT_Stress_TCPIP_04:
|
|
|
|
<<: *test_template_night
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
|
|
|
- SSC_T2_1
|
|
|
|
before_script:
|
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Stress_TCPIP_04.yml
|
|
|
|
|
|
|
|
IT_Stable_TCPIP_01:
|
|
|
|
<<: *test_template_night
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
|
|
|
- SSC_T5_1
|
|
|
|
before_script:
|
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Stable_TCPIP_01.yml
|
|
|
|
|
|
|
|
IT_Stable_TCPIP_02:
|
|
|
|
<<: *test_template_night
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
|
|
|
- SSC_T1_1
|
|
|
|
before_script:
|
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Stable_TCPIP_02.yml
|
|
|
|
|
|
|
|
IT_Stable_TCPIP_03:
|
|
|
|
<<: *test_template_night
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
|
|
|
- SSC_T5_1
|
|
|
|
before_script:
|
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Stable_TCPIP_03.yml
|
|
|
|
|
2016-10-12 03:17:56 +00:00
|
|
|
IT_Function_TCPIP_06:
|
2016-09-28 11:48:38 +00:00
|
|
|
<<: *test_template_night
|
2016-09-26 06:32:58 +00:00
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
|
|
|
- SSC_T1_1
|
|
|
|
before_script:
|
2016-10-12 03:44:54 +00:00
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_06.yml
|
2016-09-26 06:32:58 +00:00
|
|
|
|
2016-10-12 03:17:56 +00:00
|
|
|
IT_Function_WIFI_03:
|
2016-09-29 04:07:35 +00:00
|
|
|
<<: *test_template
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
2016-12-06 07:41:02 +00:00
|
|
|
- SSC_T1_APC
|
2016-09-29 04:07:35 +00:00
|
|
|
before_script:
|
2016-10-12 03:44:54 +00:00
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_WIFI_03.yml
|
2016-09-29 04:07:35 +00:00
|
|
|
|
2016-10-12 03:17:56 +00:00
|
|
|
IT_Function_WIFI_04:
|
2016-09-28 11:48:38 +00:00
|
|
|
<<: *test_template
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
2016-12-06 07:41:02 +00:00
|
|
|
- SSC_T3_PhyMode
|
2016-09-28 11:48:38 +00:00
|
|
|
before_script:
|
2016-10-12 03:44:54 +00:00
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_WIFI_04.yml
|
2016-09-28 11:48:38 +00:00
|
|
|
|
2016-10-12 03:17:56 +00:00
|
|
|
IT_Function_WIFI_05:
|
2016-09-28 11:48:38 +00:00
|
|
|
<<: *test_template
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
2016-09-29 04:07:35 +00:00
|
|
|
- SSC_T1_WEP
|
2016-09-28 11:48:38 +00:00
|
|
|
before_script:
|
2016-10-12 03:44:54 +00:00
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_WIFI_05.yml
|
2016-09-28 11:48:38 +00:00
|
|
|
|
2016-10-12 03:17:56 +00:00
|
|
|
IT_Function_WIFI_06:
|
2016-09-28 11:48:38 +00:00
|
|
|
<<: *test_template
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
|
|
|
- SSC_T2_PhyMode
|
|
|
|
before_script:
|
2016-10-12 03:44:54 +00:00
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_WIFI_06.yml
|
2016-09-28 11:48:38 +00:00
|
|
|
|
2016-10-12 03:17:56 +00:00
|
|
|
IT_Function_TCPIP_07:
|
2016-09-28 11:48:38 +00:00
|
|
|
<<: *test_template
|
2016-09-26 06:32:58 +00:00
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
|
|
|
- SSC_T1_1
|
2016-09-28 11:48:38 +00:00
|
|
|
- SSC_T1_2
|
2016-09-26 06:32:58 +00:00
|
|
|
before_script:
|
2016-10-12 03:44:54 +00:00
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_07.yml
|
2016-09-26 06:32:58 +00:00
|
|
|
|
2016-10-12 03:17:56 +00:00
|
|
|
IT_Function_TCPIP_08:
|
2016-09-27 08:22:18 +00:00
|
|
|
<<: *test_template
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
2016-09-28 11:48:38 +00:00
|
|
|
- SSC_T1_1
|
2016-12-06 07:41:02 +00:00
|
|
|
- SSC_T2_1
|
2016-09-27 08:22:18 +00:00
|
|
|
before_script:
|
2016-10-12 03:44:54 +00:00
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_08.yml
|
2016-09-28 11:48:38 +00:00
|
|
|
|
2016-10-12 03:17:56 +00:00
|
|
|
IT_Function_TCPIP_09:
|
2016-09-28 11:48:38 +00:00
|
|
|
<<: *test_template
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
|
|
|
- SSC_T1_1
|
2016-12-06 07:41:02 +00:00
|
|
|
- SSC_T1_2
|
2016-09-28 11:48:38 +00:00
|
|
|
before_script:
|
2016-10-12 03:44:54 +00:00
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_09.yml
|
2016-09-28 11:48:38 +00:00
|
|
|
|
2016-10-12 03:17:56 +00:00
|
|
|
IT_Function_TCPIP_10:
|
2016-09-28 11:48:38 +00:00
|
|
|
<<: *test_template
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
|
|
|
- SSC_T1_1
|
|
|
|
- SSC_T1_2
|
|
|
|
before_script:
|
2016-10-12 03:44:54 +00:00
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_10.yml
|
2016-09-28 11:48:38 +00:00
|
|
|
|
2016-10-12 03:17:56 +00:00
|
|
|
IT_Function_TCPIP_11:
|
2016-09-28 11:48:38 +00:00
|
|
|
<<: *test_template
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
|
|
|
- SSC_T1_1
|
|
|
|
before_script:
|
2016-10-12 03:44:54 +00:00
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_11.yml
|
2016-09-28 11:48:38 +00:00
|
|
|
|
2016-10-12 03:17:56 +00:00
|
|
|
IT_Function_TCPIP_12:
|
2016-09-28 11:48:38 +00:00
|
|
|
<<: *test_template
|
|
|
|
tags:
|
|
|
|
- ESP32_IDF
|
|
|
|
- SSC_T1_1
|
|
|
|
before_script:
|
2016-10-12 03:44:54 +00:00
|
|
|
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_12.yml
|
2016-12-06 07:41:02 +00:00
|
|
|
|