13 # Common parameters for the 'make' during CI tests
14 MAKEFLAGS: "-j5 --no-keep-going"
16 # GitLab-CI environment
18 # more attempts for more robust
19 GET_SOURCES_ATTEMPTS: "10"
20 ARTIFACT_DOWNLOAD_ATTEMPTS: "10"
22 # We use get_sources.sh script to fetch the submodules and/or re-fetch the repo
23 # if it was corrupted (if submodule update fails this can happen)
25 GIT_SUBMODULE_STRATEGY: none
27 UNIT_TEST_BUILD_SYSTEM: make
30 IDF_PATH: "$CI_PROJECT_DIR"
33 APPLY_BOT_FILTER_SCRIPT: "$CI_PROJECT_DIR/tools/ci/apply_bot_filter.py"
34 CHECKOUT_REF_SCRIPT: "$CI_PROJECT_DIR/tools/ci/checkout_project_ref.py"
37 BOT_DOCKER_IMAGE_TAG: ":latest"
39 # When 'fetch' strategy is used, Gitlab removes untracked files before checking out
40 # new revision. However if the new revision doesn't include some of the submodules
41 # which were present in the old revision, such submodule directories would not be
42 # removed by the checkout. This extra step ensures that these stale submodules
44 .git_clean_stale_submodules: &git_clean_stale_submodules >
45 find . -name '.git' -not -path './.git' -printf '%P\n'
48 grep -q {} .gitmodules
49 || (echo "Removing {}, has .git directory but not in .gitmodules file"
52 # before each job, we need to check if this job is filtered by bot stage/job filter
53 .apply_bot_filter: &apply_bot_filter
54 python $APPLY_BOT_FILTER_SCRIPT || exit 0
57 - source tools/ci/setup_python.sh
58 - *git_clean_stale_submodules
59 # apply bot filter in before script
64 - echo -n $GITLAB_KEY > ~/.ssh/id_rsa_base64
65 - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
66 - chmod 600 ~/.ssh/id_rsa
67 - echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
69 # Set IS_PRIVATE or IS_PUBLIC depending on if our branch is public or not
71 # (the same regular expressions are used to set these are used in 'only:' sections below
72 - source tools/ci/configure_ci_environment.sh
74 # fetch the submodules (& if necessary re-fetch repo) from gitlab
75 - time ./tools/ci/get-full-sources.sh
77 # used for check scripts which we want to run unconditionally
78 .do_nothing_before_no_filter:
79 before_script: &do_nothing_before_no_filter
80 - source tools/ci/setup_python.sh
81 - *git_clean_stale_submodules
83 # used for everything else where we want to do no prep, except for bot filter
85 before_script: &do_nothing_before
86 - source tools/ci/setup_python.sh
87 - *git_clean_stale_submodules
88 # apply bot filter in before script
90 - echo "Not setting up GitLab key, not fetching submodules"
91 - source tools/ci/configure_ci_environment.sh
93 .add_gitlab_key_before:
94 before_script: &add_gitlab_key_before
95 - source tools/ci/setup_python.sh
96 - *git_clean_stale_submodules
97 # apply bot filter in before script
99 - echo "Not fetching submodules"
100 - source tools/ci/configure_ci_environment.sh
104 - echo -n $GITLAB_KEY > ~/.ssh/id_rsa_base64
105 - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
106 - chmod 600 ~/.ssh/id_rsa
107 - echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
111 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
119 - $BOT_TRIGGER_WITH_LABEL == null
121 - $BOT_LABEL_REGULAR_TEST
123 # Set the variable for 'esp-idf-template' testing
124 - ESP_IDF_TEMPLATE_GIT=${ESP_IDF_TEMPLATE_GIT:-"https://github.com/espressif/esp-idf-template.git"}
125 - git clone ${ESP_IDF_TEMPLATE_GIT}
126 - cd esp-idf-template
127 # Try to use the same branch name for esp-idf-template that we're
128 # using on esp-idf. If it doesn't exist then just stick to the default
130 - python $CHECKOUT_REF_SCRIPT esp-idf-template
132 # Test debug build (default)
134 # Now test release build
136 - sed -i.bak -e's/CONFIG_OPTIMIZATION_LEVEL_DEBUG\=y/CONFIG_OPTIMIZATION_LEVEL_RELEASE=y/' sdkconfig
138 # Check if there are any stray printf/ets_printf references in WiFi libs
139 - cd ../components/esp32/lib
140 - test $(xtensa-esp32-elf-nm *.a | grep -w printf | wc -l) -eq 0
141 - test $(xtensa-esp32-elf-nm *.a | grep -w ets_printf | wc -l) -eq 0
144 .build_template: &build_template
146 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
153 .build_ssc_template: &build_ssc_template
160 SSC_CONFIG_FOLDER: "$CI_PROJECT_DIR/SSC/configs/ESP32_IDF"
163 - $BOT_TRIGGER_WITH_LABEL == null
165 - $BOT_LABEL_INTEGRATION_TEST
166 - $BOT_LABEL_REGULAR_TEST
168 - git clone $SSC_REPOSITORY
170 - python $CHECKOUT_REF_SCRIPT SSC
171 - MAKEFLAGS= ./ci_build_ssc.sh "${CI_JOB_NAME}" "${IDF_PATH}/.gitlab-ci.yml"
173 # don't forget to add to dependency to test_template when adding new build_ssc jobs
175 <<: *build_ssc_template
178 <<: *build_ssc_template
181 <<: *build_ssc_template
183 # If you want to add new build ssc jobs, please add it into dependencies of `assign_test` and `.test_template`
186 .build_esp_idf_unit_test_template: &build_esp_idf_unit_test_template
190 - tools/unit-test-app/output
191 - components/idf_test/unit_test/TestCaseAll.yml
195 - $BOT_TRIGGER_WITH_LABEL == null
197 - $BOT_LABEL_UNIT_TEST
198 - $BOT_LABEL_REGULAR_TEST
200 build_esp_idf_tests_make:
201 <<: *build_esp_idf_unit_test_template
203 - export EXTRA_CFLAGS=${PEDANTIC_CFLAGS}
204 - export EXTRA_CXXFLAGS=${EXTRA_CFLAGS}
205 - cd $CI_PROJECT_DIR/tools/unit-test-app
206 - MAKEFLAGS= make help # make sure kconfig tools are built in single process
207 - make ut-clean-all-configs
208 - make ut-build-all-configs
209 - python tools/UnitTestParser.py
210 # Check if the tests demand Make built binaries. If not, delete them
211 - if [ "$UNIT_TEST_BUILD_SYSTEM" == "make" ]; then exit 0; fi
212 - rm -rf builds output sdkconfig
213 - rm -rf components/idf_test/unit_test/TestCaseAll.yml
214 - rm -rf components/idf_test/unit_test/CIConfigs/*.yml
216 build_esp_idf_tests_cmake:
217 <<: *build_esp_idf_unit_test_template
219 - export PATH="$IDF_PATH/tools:$PATH"
220 - export EXTRA_CFLAGS=${PEDANTIC_CFLAGS}
221 - export EXTRA_CXXFLAGS=${EXTRA_CFLAGS}
222 - cd $CI_PROJECT_DIR/tools/unit-test-app
223 - idf.py ut-clean-all-configs
224 - idf.py ut-build-all-configs
225 - python tools/UnitTestParser.py
226 # Check if the tests demand CMake built binaries. If not, delete them
227 - if [ "$UNIT_TEST_BUILD_SYSTEM" == "cmake" ]; then exit 0; fi
228 - rm -rf builds output sdkconfig
229 - rm -rf components/idf_test/unit_test/TestCaseAll.yml
230 - rm -rf components/idf_test/unit_test/CIConfigs/*.yml
232 .build_examples_make_template: &build_examples_make_template
234 # This is a workaround for a rarely encountered issue with building examples in CI.
235 # Probably related to building of Kconfig in 'make clean' stage
240 - build_examples/*/*/*/build/*.bin
241 - build_examples/*/*/*/sdkconfig
242 - build_examples/*/*/*/build/*.elf
243 - build_examples/*/*/*/build/*.map
244 - build_examples/*/*/*/build/download.config
245 - build_examples/*/*/*/build/bootloader/*.bin
250 LOG_PATH: "$CI_PROJECT_DIR/log_examples_make"
253 - $BOT_TRIGGER_WITH_LABEL == null
255 - $BOT_LABEL_EXAMPLE_TEST
256 - $BOT_LABEL_REGULAR_TEST
258 # it's not possible to build 100% out-of-tree and have the "artifacts"
259 # mechanism work, but this is the next best thing
260 - rm -rf build_examples
261 - mkdir build_examples
263 # build some of examples
264 - mkdir -p ${LOG_PATH}
265 - ${IDF_PATH}/tools/ci/build_examples.sh "${CI_JOB_NAME}"
267 # same as above, but for CMake
268 .build_examples_cmake_template: &build_examples_cmake_template
273 - build_examples_cmake/*/*/*/build/*.bin
274 - build_examples_cmake/*/*/*/sdkconfig
275 - build_examples_cmake/*/*/*/build/*.elf
276 - build_examples_cmake/*/*/*/build/*.map
277 - build_examples_cmake/*/*/*/build/download.config
278 - build_examples_cmake/*/*/*/build/bootloader/*.bin
283 LOG_PATH: "$CI_PROJECT_DIR/log_examples_cmake"
286 - $BOT_TRIGGER_WITH_LABEL == null
288 - $BOT_LABEL_EXAMPLE_TEST
289 - $BOT_LABEL_REGULAR_TEST
291 # it's not possible to build 100% out-of-tree and have the "artifacts"
292 # mechanism work, but this is the next best thing
293 - rm -rf build_examples_cmake
294 - mkdir build_examples_cmake
295 - cd build_examples_cmake
296 # build some of examples
297 - mkdir -p ${LOG_PATH}
298 - ${IDF_PATH}/tools/ci/build_examples_cmake.sh "${CI_JOB_NAME}"
300 build_examples_make_00:
301 <<: *build_examples_make_template
303 build_examples_make_01:
304 <<: *build_examples_make_template
306 build_examples_make_02:
307 <<: *build_examples_make_template
309 build_examples_make_03:
310 <<: *build_examples_make_template
312 build_examples_make_04:
313 <<: *build_examples_make_template
315 build_examples_make_05:
316 <<: *build_examples_make_template
318 build_examples_make_06:
319 <<: *build_examples_make_template
321 build_examples_make_07:
322 <<: *build_examples_make_template
324 build_examples_cmake_00:
325 <<: *build_examples_cmake_template
327 build_examples_cmake_01:
328 <<: *build_examples_cmake_template
330 build_examples_cmake_02:
331 <<: *build_examples_cmake_template
333 build_examples_cmake_03:
334 <<: *build_examples_cmake_template
336 build_examples_cmake_04:
337 <<: *build_examples_cmake_template
339 build_examples_cmake_05:
340 <<: *build_examples_cmake_template
342 build_examples_cmake_06:
343 <<: *build_examples_cmake_template
345 build_examples_cmake_07:
346 <<: *build_examples_cmake_template
348 # If you want to add new build example jobs, please add it into dependencies of `.example_test_template`
352 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
358 # English version of documentation
359 - docs/en/doxygen-warning-log.txt
360 - docs/en/sphinx-warning-log.txt
361 - docs/en/sphinx-warning-log-sanitized.txt
362 - docs/en/_build/html
364 # Chinese version of documentation
365 - docs/zh_CN/doxygen-warning-log.txt
366 - docs/zh_CN/sphinx-warning-log.txt
367 - docs/zh_CN/sphinx-warning-log-sanitized.txt
368 - docs/zh_CN/_build/html
372 - $BOT_TRIGGER_WITH_LABEL == null
374 - $BOT_LABEL_BUILD_DOCS
375 - $BOT_LABEL_REGULAR_TEST
378 - ./check_lang_folder_sync.sh
382 - ../check_doc_warnings.sh
386 - ../check_doc_warnings.sh
388 .check_job_template: &check_job_template
390 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
394 before_script: *do_nothing_before_no_filter
397 <<: *check_job_template
401 - $BOT_TRIGGER_WITH_LABEL == null
403 - $BOT_LABEL_REGULAR_TEST
405 tools/cmake/run_cmake_lint.sh
407 .host_test_template: &host_test_template
409 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
415 - $BOT_TRIGGER_WITH_LABEL == null
416 - $BOT_LABEL_HOST_TEST
417 - $BOT_LABEL_REGULAR_TEST
420 <<: *host_test_template
422 - cd components/nvs_flash/test_nvs_host
426 <<: *host_test_template
429 - components/nvs_flash/test_nvs_host/coverage_report
435 - $BOT_LABEL_NVS_COVERAGE
437 - cd components/nvs_flash/test_nvs_host
438 - make coverage_report
440 test_partition_table_on_host:
441 <<: *host_test_template
445 - cd components/partition_table/test_gen_esp32part_host
446 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./gen_esp32part_tests.py
449 <<: *host_test_template
452 - components/wear_levelling/test_wl_host/coverage_report.zip
455 - cd components/wear_levelling/test_wl_host
459 <<: *host_test_template
461 - cd components/fatfs/test_fatfs_host/
465 <<: *host_test_template
467 - cd tools/ldgen/test
468 - ./test_fragments.py
469 - ./test_generation.py
471 .host_fuzzer_test_template: &host_fuzzer_test_template
473 image: $CI_DOCKER_REGISTRY/afl-fuzzer-test
480 - ${FUZZER_TEST_DIR}/out/crashes
481 - ${FUZZER_TEST_DIR}/fuzz_output.log
485 # can only be triggered
488 - $BOT_LABEL_FUZZER_TEST
490 - export AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES=1 && export AFL_SKIP_CPUFREQ=1
491 - cd ${FUZZER_TEST_DIR}
492 # run AFL fuzzer for one hour
493 - ( ( make ${FUZZER_PARAMS} fuzz | tee fuzz_output.log | grep -v '\(Fuzzing test case\|Entering queue cycle\)' ) || pkill sleep ) &
494 - ( sleep 3600 || mkdir -p out/crashes/env_failed ) && pkill afl-fuz
495 # check no crashes found
496 - test -z "$(ls out/crashes/)" || exit 1
498 test_mdns_fuzzer_on_host:
499 <<: *host_fuzzer_test_template
501 BOT_NEEDS_TRIGGER_BY_NAME: 1
502 FUZZER_TEST_DIR: components/mdns/test_afl_fuzz_host
504 test_lwip_dns_fuzzer_on_host:
505 <<: *host_fuzzer_test_template
507 BOT_NEEDS_TRIGGER_BY_NAME: 1
508 FUZZER_TEST_DIR: components/lwip/test_afl_host
509 FUZZER_PARAMS: MODE=dns
511 test_lwip_dhcp_fuzzer_on_host:
512 <<: *host_fuzzer_test_template
514 BOT_NEEDS_TRIGGER_BY_NAME: 1
515 FUZZER_TEST_DIR: components/lwip/test_afl_host
516 FUZZER_PARAMS: MODE=dhcp_client
518 test_lwip_dhcps_fuzzer_on_host:
519 <<: *host_fuzzer_test_template
521 BOT_NEEDS_TRIGGER_BY_NAME: 1
522 FUZZER_TEST_DIR: components/lwip/test_afl_host
523 FUZZER_PARAMS: MODE=dhcp_server
526 <<: *host_test_template
528 - cd components/spiffs/test_spiffs_host/
531 test_multi_heap_on_host:
532 <<: *host_test_template
534 - cd components/heap/test_multi_heap_host
535 - ./test_all_configs.sh
538 <<: *host_test_template
540 - cd tools/kconfig_new/test
541 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./test_confserver.py
544 <<: *host_test_template
546 - ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh
547 - rm -rf test_build_system
548 - mkdir test_build_system
549 - cd test_build_system
550 - ${IDF_PATH}/tools/ci/test_build_system.sh
552 test_build_system_cmake:
553 <<: *host_test_template
555 - ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh
556 - rm -rf test_build_system
557 - mkdir test_build_system
558 - cd test_build_system
559 - ${IDF_PATH}/tools/ci/test_build_system_cmake.sh
562 <<: *host_test_template
566 - tools/test_idf_monitor/outputs/*
569 - cd ${IDF_PATH}/tools/test_idf_monitor
570 - ./run_test_idf_monitor.py
573 <<: *host_test_template
577 - tools/test_idf_size/output
578 - tools/test_idf_size/.coverage
581 - cd ${IDF_PATH}/tools/test_idf_size
582 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./test.sh
584 test_esp_err_to_name_on_host:
585 <<: *host_test_template
589 - components/esp32/esp_err_to_name.c
592 - cd ${IDF_PATH}/tools/
593 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh -p 2.7.15 ./gen_esp_err_to_name.py
594 - git diff --exit-code -- ../components/esp32/esp_err_to_name.c || { echo 'Differences found. Please run gen_esp_err_to_name.py and commit the changes.'; exit 1; }
595 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh -p 3.4.8 ./gen_esp_err_to_name.py
596 - git diff --exit-code -- ../components/esp32/esp_err_to_name.c || { echo 'Differences found between running under Python 2 and 3.'; exit 1; }
599 <<: *host_test_template
603 - components/espcoredump/test/.coverage
604 - components/espcoredump/test/output
607 - cd components/espcoredump/test/
608 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./test_espcoredump.sh
612 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
618 - /^v\d+\.\d+(\.\d+)?($|-)/
621 before_script: *do_nothing_before
625 - echo -n $GH_PUSH_KEY > ~/.ssh/id_rsa_base64
626 - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
627 - chmod 600 ~/.ssh/id_rsa
628 - echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
629 - git remote remove github &>/dev/null || true
630 - git remote add github git@github.com:espressif/esp-idf.git
631 - tools/ci/push_to_github.sh
635 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
642 - /^v\d+\.\d+(\.\d+)?($|-)/
645 - $BOT_TRIGGER_WITH_LABEL == null
646 - $BOT_LABEL_BUILD_DOCS
649 before_script: *do_nothing_before
653 - echo -n $DOCS_DEPLOY_KEY > ~/.ssh/id_rsa_base64
654 - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
655 - chmod 600 ~/.ssh/id_rsa
656 - echo -e "Host $DOCS_SERVER\n\tStrictHostKeyChecking no\n\tUser $DOCS_SERVER_USER\n" >> ~/.ssh/config
657 - export GIT_VER=$(git describe --always)
660 - tar czvf $GIT_VER.tar.gz $GIT_VER
661 - scp $GIT_VER.tar.gz $DOCS_SERVER:$DOCS_PATH/en
662 - ssh $DOCS_SERVER -x "cd $DOCS_PATH/en && tar xzvf $GIT_VER.tar.gz && rm -f latest && ln -s $GIT_VER latest"
663 - cd ../../zh_CN/_build/
665 - tar czvf $GIT_VER.tar.gz $GIT_VER
666 - scp $GIT_VER.tar.gz $DOCS_SERVER:$DOCS_PATH/zh_CN
667 - ssh $DOCS_SERVER -x "cd $DOCS_PATH/zh_CN && tar xzvf $GIT_VER.tar.gz && rm -f latest && ln -s $GIT_VER latest"
668 # add link to preview doc
669 - echo "[document preview][en] $CI_DOCKER_REGISTRY/docs/esp-idf/en/${GIT_VER}/index.html"
670 - echo "[document preview][zh_CN] $CI_DOCKER_REGISTRY/docs/esp-idf/zh_CN/${GIT_VER}/index.html"
674 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
679 # can only be triggered
682 - $BOT_TRIGGER_WITH_LABEL == null
683 - $BOT_LABEL_BUILD_DOCS
686 - docs/_build/linkcheck
689 # must be triggered with CHECK_LINKS=Yes, otherwise exit without test
690 - test "$CHECK_LINKS" = "Yes" || exit 0
691 # can only run on master branch (otherwise the commit is not on Github yet)
692 - test "${CI_COMMIT_REF_NAME}" = "master" || exit 0
697 <<: *check_job_template
699 - tools/ci/check-line-endings.sh ${IDF_PATH}
702 <<: *check_job_template
705 - git log -n10 --oneline
706 # commit start with "WIP: " need to be squashed before merge
707 - 'git log --pretty=%s master.. -- | grep "^WIP: " && exit 1 || exit 0'
710 <<: *check_job_template
712 - tools/ci/check-executable.sh
714 check_examples_cmake_make:
715 <<: *check_job_template
719 - /^v\d+\.\d+(\.\d+)?($|-)/
720 before_script: *do_nothing_before
722 - tools/ci/check_examples_cmake_make.sh
725 <<: *check_job_template
731 before_script: *do_nothing_before
733 # run it only under Python 3 (it is very slow under Python 2)
734 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh -p 3.4.8 python -m flake8 --config=$IDF_PATH/.flake8 --output-file=flake8_output.txt --tee --benchmark $IDF_PATH
737 <<: *check_job_template
738 before_script: *do_nothing_before
742 - components/*/Kconfig*.new
743 - examples/*/*/*/Kconfig*.new
744 - examples/*/*/*/*/Kconfig*.new
745 - tools/*/Kconfig*.new
746 - tools/*/*/Kconfig*.new
747 - tools/*/*/*/Kconfig*.new
750 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ${IDF_PATH}/tools/test_check_kconfigs.py
751 - ${IDF_PATH}/tools/check_kconfigs.py
755 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
761 - /^v\d+\.\d+(\.\d+)?($|-)/
763 before_script: *do_nothing_before
765 - tools/ci/check_ut_cmake_make.sh
767 check_submodule_sync:
768 <<: *check_job_template
772 # check if all submodules are correctly synced to public repostory
773 - git submodule update --init --recursive
775 check_artifacts_expire_time:
776 <<: *check_job_template
778 # check if we have set expire time for all artifacts
779 - python tools/ci/check_artifacts_expire_time.py
781 check_pipeline_triggered_by_label:
782 <<: *check_job_template
786 - $BOT_TRIGGER_WITH_LABEL
788 # If the pipeline is triggered with label, the pipeline will only succeeded if "regular_test" label is added.
789 # We want to make sure some jobs are always executed to detect regression.
790 - test "$BOT_LABEL_REGULAR_TEST" = "true" || exit -1
795 image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG
797 # gitlab ci do not support match job with RegEx or wildcard now in dependencies.
798 # we have a lot build example jobs. now we don't use dependencies, just download all artificats of build stage.
803 - build_esp_idf_tests_make
804 - build_esp_idf_tests_cmake
806 TEST_FW_PATH: "$CI_PROJECT_DIR/tools/tiny-test-fw"
807 EXAMPLE_CONFIG_OUTPUT_PATH: "$CI_PROJECT_DIR/examples/test_configs"
810 - components/idf_test/*/CIConfigs
811 - components/idf_test/*/TC.sqlite
812 - $EXAMPLE_CONFIG_OUTPUT_PATH
816 - $BOT_TRIGGER_WITH_LABEL == null
817 - $BOT_LABEL_UNIT_TEST
818 - $BOT_LABEL_INTEGRATION_TEST
819 - $BOT_LABEL_EXAMPLE_TEST
821 # assign example tests
822 - python $TEST_FW_PATH/CIAssignExampleTest.py $IDF_PATH/examples $IDF_PATH/.gitlab-ci.yml $EXAMPLE_CONFIG_OUTPUT_PATH
823 # assign unit test cases
824 - python $TEST_FW_PATH/CIAssignUnitTest.py $IDF_PATH/components/idf_test/unit_test/TestCaseAll.yml $IDF_PATH/.gitlab-ci.yml $IDF_PATH/components/idf_test/unit_test/CIConfigs
825 # clone test script to assign tests
826 - git clone $TEST_SCRIPT_REPOSITORY
827 - cd auto_test_script
828 - python $CHECKOUT_REF_SCRIPT auto_test_script
829 # assgin integration test cases
830 - python CIAssignTestCases.py -t $IDF_PATH/components/idf_test/integration_test -c $IDF_PATH/.gitlab-ci.yml -b $IDF_PATH/SSC/ssc_bin
832 .example_test_template: &example_test_template
839 - /^v\d+\.\d+(\.\d+)?($|-)/
843 - $BOT_TRIGGER_WITH_LABEL == null
844 - $BOT_LABEL_EXAMPLE_TEST
847 - build_examples_make_00
848 - build_examples_make_01
849 - build_examples_make_02
850 - build_examples_make_03
851 - build_examples_make_04
852 - build_examples_make_05
853 - build_examples_make_06
854 - build_examples_make_07
855 - build_examples_cmake_00
856 - build_examples_cmake_01
857 - build_examples_cmake_02
858 - build_examples_cmake_03
859 - build_examples_cmake_04
860 - build_examples_cmake_05
861 - build_examples_cmake_06
862 - build_examples_cmake_07
869 junit: $LOG_PATH/*/XUNIT_RESULT.xml
871 TEST_FW_PATH: "$CI_PROJECT_DIR/tools/tiny-test-fw"
872 TEST_CASE_PATH: "$CI_PROJECT_DIR/examples"
873 CONFIG_FILE: "$CI_PROJECT_DIR/examples/test_configs/$CI_JOB_NAME.yml"
874 LOG_PATH: "$CI_PROJECT_DIR/TEST_LOGS"
875 ENV_FILE: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/EnvConfig.yml"
877 # first test if config file exists, if not exist, exit 0
878 - test -e $CONFIG_FILE || exit 0
879 # clone test env configs
880 - git clone $TEST_ENV_CONFIG_REPOSITORY
881 - cd ci-test-runner-configs
882 - python $CHECKOUT_REF_SCRIPT ci-test-runner-configs
885 - python Runner.py $TEST_CASE_PATH -c $CONFIG_FILE -e $ENV_FILE
887 .unit_test_template: &unit_test_template
888 <<: *example_test_template
892 - build_esp_idf_tests_make
893 - build_esp_idf_tests_cmake
898 - /^v\d+\.\d+(\.\d+)?($|-)/
902 - $BOT_TRIGGER_WITH_LABEL == null
903 - $BOT_LABEL_UNIT_TEST
905 TEST_FW_PATH: "$CI_PROJECT_DIR/tools/tiny-test-fw"
906 TEST_CASE_PATH: "$CI_PROJECT_DIR/tools/unit-test-app"
907 CONFIG_FILE: "$CI_PROJECT_DIR/components/idf_test/unit_test/CIConfigs/$CI_JOB_NAME.yml"
908 LOG_PATH: "$CI_PROJECT_DIR/TEST_LOGS"
909 ENV_FILE: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/EnvConfig.yml"
911 .test_template: &test_template
918 - /^v\d+\.\d+(\.\d+)?($|-)/
922 - $BOT_TRIGGER_WITH_LABEL == null
923 - $BOT_LABEL_INTEGRATION_TEST
935 LOCAL_ENV_CONFIG_PATH: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/ESP32_IDF"
936 LOG_PATH: "$CI_PROJECT_DIR/$CI_COMMIT_SHA"
937 TEST_CASE_FILE_PATH: "$CI_PROJECT_DIR/components/idf_test/integration_test"
938 MODULE_UPDATE_FILE: "$CI_PROJECT_DIR/components/idf_test/ModuleDefinition.yml"
939 CONFIG_FILE: "$CI_PROJECT_DIR/components/idf_test/integration_test/CIConfigs/$CI_JOB_NAME.yml"
940 before_script: *add_gitlab_key_before
942 # first test if config file exists, if not exist, exit 0
943 - test -e $CONFIG_FILE || exit 0
944 # clone local test env configs
945 - git clone $TEST_ENV_CONFIG_REPOSITORY
946 - cd ci-test-runner-configs
947 - python $CHECKOUT_REF_SCRIPT ci-test-runner-configs
949 - git clone $TEST_SCRIPT_REPOSITORY
950 - cd auto_test_script
951 - python $CHECKOUT_REF_SCRIPT auto_test_script
953 - python CIRunner.py -l "$LOG_PATH/$CI_JOB_NAME" -c $CONFIG_FILE -e $LOCAL_ENV_CONFIG_PATH -t $TEST_CASE_FILE_PATH -m $MODULE_UPDATE_FILE
967 # clone local test env configs
968 - git clone $TEST_ENV_CONFIG_REPOSITORY
969 - cd ci-test-runner-configs
970 - python $CHECKOUT_REF_SCRIPT ci-test-runner-configs
972 - git clone $TEST_SCRIPT_REPOSITORY
973 - cd auto_test_script
974 - git checkout ${CI_COMMIT_REF_NAME} || echo "Using default branch..."
976 - ./Tools/prepare_nvs_bin.sh
978 - python CIRunner.py -l "$LOG_PATH/$CI_JOB_NAME" -c $CONFIG_FILE -e $LOCAL_ENV_CONFIG_PATH -t $TEST_CASE_FILE_PATH -m $MODULE_UPDATE_FILE
981 <<: *example_test_template
987 <<: *example_test_template
993 <<: *example_test_template
994 image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG
997 - Example_ShieldBox_Basic
1000 <<: *example_test_template
1005 example_test_004_01:
1006 <<: *example_test_template
1011 example_test_005_01:
1012 <<: *example_test_template
1017 example_test_006_01:
1018 <<: *example_test_template
1019 image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG
1022 - $BOT_LABEL_IPERF_STRESS_TEST
1027 example_test_007_01:
1028 <<: *example_test_template
1031 - Example_I2C_CCS811_SENSOR
1034 <<: *unit_test_template
1040 <<: *unit_test_template
1046 <<: *unit_test_template
1052 <<: *unit_test_template
1058 <<: *unit_test_template
1064 <<: *unit_test_template
1070 <<: *unit_test_template
1076 <<: *unit_test_template
1082 <<: *unit_test_template
1088 <<: *unit_test_template
1094 <<: *unit_test_template
1100 <<: *unit_test_template
1106 <<: *unit_test_template
1112 <<: *unit_test_template
1118 <<: *unit_test_template
1124 <<: *unit_test_template
1130 <<: *unit_test_template
1136 <<: *unit_test_template
1142 <<: *unit_test_template
1148 <<: *unit_test_template
1154 <<: *unit_test_template
1160 <<: *unit_test_template
1166 <<: *unit_test_template
1172 <<: *unit_test_template
1178 <<: *unit_test_template
1184 <<: *unit_test_template
1190 <<: *unit_test_template
1196 <<: *unit_test_template
1202 <<: *unit_test_template
1208 <<: *unit_test_template
1214 <<: *unit_test_template
1220 <<: *unit_test_template
1226 <<: *unit_test_template
1232 <<: *unit_test_template
1238 <<: *unit_test_template
1244 <<: *unit_test_template
1250 <<: *unit_test_template
1256 <<: *unit_test_template
1262 <<: *unit_test_template
1268 <<: *unit_test_template
1274 <<: *unit_test_template
1280 <<: *unit_test_template
1286 <<: *unit_test_template
1292 <<: *unit_test_template
1298 <<: *unit_test_template
1304 <<: *unit_test_template
1310 <<: *unit_test_template
1316 <<: *unit_test_template
1322 <<: *unit_test_template
1329 <<: *unit_test_template
1336 <<: *unit_test_template
1343 <<: *unit_test_template
1350 <<: *unit_test_template
1357 <<: *unit_test_template
1364 <<: *unit_test_template
1371 <<: *unit_test_template
1378 <<: *unit_test_template
1385 <<: *unit_test_template
1392 <<: *unit_test_template
1399 <<: *unit_test_template
1406 <<: *unit_test_template
1413 <<: *unit_test_template
1420 <<: *unit_test_template
1427 <<: *unit_test_template
1434 <<: *unit_test_template
1441 <<: *unit_test_template
1448 <<: *unit_test_template
1455 <<: *unit_test_template
1461 <<: *unit_test_template
1467 <<: *unit_test_template
1473 <<: *unit_test_template
1480 <<: *unit_test_template
1486 <<: *unit_test_template
1492 <<: *unit_test_template
1498 <<: *unit_test_template
1505 <<: *unit_test_template
1511 <<: *unit_test_template
1517 <<: *unit_test_template
1523 <<: *unit_test_template
1530 <<: *unit_test_template
1536 <<: *unit_test_template
1542 <<: *unit_test_template
1548 <<: *unit_test_template
1555 <<: *unit_test_template
1561 <<: *unit_test_template
1567 <<: *unit_test_template
1573 <<: *unit_test_template
1580 <<: *unit_test_template
1586 <<: *unit_test_template
1592 <<: *unit_test_template
1598 <<: *unit_test_template
1605 <<: *unit_test_template
1612 <<: *unit_test_template
1619 <<: *unit_test_template
1626 <<: *unit_test_template
1633 <<: *unit_test_template
1639 <<: *unit_test_template
1645 <<: *unit_test_template
1651 <<: *unit_test_template
1658 <<: *unit_test_template
1664 <<: *unit_test_template
1670 <<: *unit_test_template
1676 <<: *unit_test_template
1683 <<: *unit_test_template
1689 <<: *unit_test_template
1695 <<: *unit_test_template
1701 <<: *unit_test_template
1708 <<: *unit_test_template
1714 <<: *unit_test_template
1720 <<: *unit_test_template
1726 <<: *unit_test_template
1733 <<: *unit_test_template
1740 <<: *unit_test_template