14 # Common parameters for the 'make' during CI tests
15 MAKEFLAGS: "-j5 --no-keep-going"
17 # GitLab-CI environment
19 # more attempts for more robust
20 GET_SOURCES_ATTEMPTS: "10"
21 ARTIFACT_DOWNLOAD_ATTEMPTS: "10"
23 # We use get_sources.sh script to fetch the submodules and/or re-fetch the repo
24 # if it was corrupted (if submodule update fails this can happen)
26 GIT_SUBMODULE_STRATEGY: none
28 UNIT_TEST_BUILD_SYSTEM: make
31 IDF_PATH: "$CI_PROJECT_DIR"
34 APPLY_BOT_FILTER_SCRIPT: "$CI_PROJECT_DIR/tools/ci/apply_bot_filter.py"
35 CHECKOUT_REF_SCRIPT: "$CI_PROJECT_DIR/tools/ci/checkout_project_ref.py"
38 BOT_DOCKER_IMAGE_TAG: ":latest"
40 # When 'fetch' strategy is used, Gitlab removes untracked files before checking out
41 # new revision. However if the new revision doesn't include some of the submodules
42 # which were present in the old revision, such submodule directories would not be
43 # removed by the checkout. This extra step ensures that these stale submodules
45 .git_clean_stale_submodules: &git_clean_stale_submodules >
46 find . -name '.git' -not -path './.git' -printf '%P\n'
49 grep -q {} .gitmodules
50 || (echo "Removing {}, has .git directory but not in .gitmodules file"
53 # before each job, we need to check if this job is filtered by bot stage/job filter
54 .apply_bot_filter: &apply_bot_filter
55 python $APPLY_BOT_FILTER_SCRIPT || exit 0
58 - source tools/ci/setup_python.sh
59 - *git_clean_stale_submodules
60 # apply bot filter in before script
65 - echo -n $GITLAB_KEY > ~/.ssh/id_rsa_base64
66 - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
67 - chmod 600 ~/.ssh/id_rsa
68 - echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
70 # Set IS_PRIVATE or IS_PUBLIC depending on if our branch is public or not
72 # (the same regular expressions are used to set these are used in 'only:' sections below
73 - source tools/ci/configure_ci_environment.sh
75 # fetch the submodules (& if necessary re-fetch repo) from gitlab
76 - time ./tools/ci/get-full-sources.sh
78 # used for check scripts which we want to run unconditionally
79 .do_nothing_before_no_filter:
80 before_script: &do_nothing_before_no_filter
81 - source tools/ci/setup_python.sh
82 - *git_clean_stale_submodules
84 # used for everything else where we want to do no prep, except for bot filter
86 before_script: &do_nothing_before
87 - source tools/ci/setup_python.sh
88 - *git_clean_stale_submodules
89 # apply bot filter in before script
91 - echo "Not setting up GitLab key, not fetching submodules"
92 - source tools/ci/configure_ci_environment.sh
94 .add_gitlab_key_before:
95 before_script: &add_gitlab_key_before
96 - source tools/ci/setup_python.sh
97 - *git_clean_stale_submodules
98 # apply bot filter in before script
100 - echo "Not fetching submodules"
101 - source tools/ci/configure_ci_environment.sh
105 - echo -n $GITLAB_KEY > ~/.ssh/id_rsa_base64
106 - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
107 - chmod 600 ~/.ssh/id_rsa
108 - echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
112 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
120 - $BOT_TRIGGER_WITH_LABEL == null
122 - $BOT_LABEL_REGULAR_TEST
124 # Set the variable for 'esp-idf-template' testing
125 - ESP_IDF_TEMPLATE_GIT=${ESP_IDF_TEMPLATE_GIT:-"https://github.com/espressif/esp-idf-template.git"}
126 - git clone ${ESP_IDF_TEMPLATE_GIT}
127 - cd esp-idf-template
128 # Try to use the same branch name for esp-idf-template that we're
129 # using on esp-idf. If it doesn't exist then just stick to the default
131 - python $CHECKOUT_REF_SCRIPT esp-idf-template
133 # Test debug build (default)
135 # Now test release build
137 - sed -i.bak -e's/CONFIG_OPTIMIZATION_LEVEL_DEBUG\=y/CONFIG_OPTIMIZATION_LEVEL_RELEASE=y/' sdkconfig
139 # Check if there are any stray printf/ets_printf references in WiFi libs
140 - cd ../components/esp32/lib
141 - test $(xtensa-esp32-elf-nm *.a | grep -w printf | wc -l) -eq 0
142 - test $(xtensa-esp32-elf-nm *.a | grep -w ets_printf | wc -l) -eq 0
145 .build_template: &build_template
147 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
154 .build_ssc_template: &build_ssc_template
161 SSC_CONFIG_FOLDER: "$CI_PROJECT_DIR/SSC/configs/ESP32_IDF"
164 - $BOT_TRIGGER_WITH_LABEL == null
166 - $BOT_LABEL_INTEGRATION_TEST
167 - $BOT_LABEL_REGULAR_TEST
169 - git clone $SSC_REPOSITORY
171 - python $CHECKOUT_REF_SCRIPT SSC
172 - MAKEFLAGS= ./ci_build_ssc.sh "${CI_JOB_NAME}" "${IDF_PATH}/.gitlab-ci.yml"
174 # don't forget to add to dependency to test_template when adding new build_ssc jobs
176 <<: *build_ssc_template
179 <<: *build_ssc_template
182 <<: *build_ssc_template
184 # If you want to add new build ssc jobs, please add it into dependencies of `assign_test` and `.test_template`
187 .build_esp_idf_unit_test_template: &build_esp_idf_unit_test_template
191 - tools/unit-test-app/output
192 - components/idf_test/unit_test/TestCaseAll.yml
196 - $BOT_TRIGGER_WITH_LABEL == null
198 - $BOT_LABEL_UNIT_TEST
199 - $BOT_LABEL_REGULAR_TEST
201 build_esp_idf_tests_make:
202 <<: *build_esp_idf_unit_test_template
204 - export EXTRA_CFLAGS="-Werror -Werror=deprecated-declarations"
205 - export EXTRA_CXXFLAGS=${EXTRA_CFLAGS}
206 - cd $CI_PROJECT_DIR/tools/unit-test-app
207 - MAKEFLAGS= make help # make sure kconfig tools are built in single process
208 - make ut-clean-all-configs
209 - make ut-build-all-configs
210 - python tools/UnitTestParser.py
211 - if [ "$UNIT_TEST_BUILD_SYSTEM" == "make" ]; then exit 0; fi
212 # If Make, delete the CMake built artifacts
213 - rm -rf builds output sdkconfig
214 - rm -rf components/idf_test/unit_test/TestCaseAll.yml
215 - rm -rf components/idf_test/unit_test/CIConfigs/*.yml
217 build_esp_idf_tests_cmake:
218 <<: *build_esp_idf_unit_test_template
220 - export PATH="$IDF_PATH/tools:$PATH"
221 - export EXTRA_CFLAGS="-Werror -Werror=deprecated-declarations"
222 - export EXTRA_CXXFLAGS=${EXTRA_CFLAGS}
223 - cd $CI_PROJECT_DIR/tools/unit-test-app
224 # Build with CMake first
225 - idf.py ut-clean-all-configs
226 - idf.py ut-build-all-configs
227 - python tools/UnitTestParser.py
228 # Check if test demands CMake or Make built binaries. If CMake leave the built artifacts as is then exit.
229 - if [ "$UNIT_TEST_BUILD_SYSTEM" == "cmake" ]; then exit 0; fi
230 # If Make, delete the CMake built artifacts
231 - rm -rf builds output sdkconfig
232 - rm -rf components/idf_test/unit_test/TestCaseAll.yml
233 - rm -rf components/idf_test/unit_test/CIConfigs/*.yml
235 .build_examples_make_template: &build_examples_make_template
237 # This is a workaround for a rarely encountered issue with building examples in CI.
238 # Probably related to building of Kconfig in 'make clean' stage
243 - build_examples/*/*/*/build/*.bin
244 - build_examples/*/*/*/build/*.elf
245 - build_examples/*/*/*/build/*.map
246 - build_examples/*/*/*/build/download.config
247 - build_examples/*/*/*/build/bootloader/*.bin
252 LOG_PATH: "$CI_PROJECT_DIR/log_examples_make"
255 - $BOT_TRIGGER_WITH_LABEL == null
257 - $BOT_LABEL_EXAMPLE_TEST
258 - $BOT_LABEL_REGULAR_TEST
260 # it's not possible to build 100% out-of-tree and have the "artifacts"
261 # mechanism work, but this is the next best thing
262 - rm -rf build_examples
263 - mkdir build_examples
265 # build some of examples
266 - mkdir -p ${LOG_PATH}
267 - ${IDF_PATH}/tools/ci/build_examples.sh "${CI_JOB_NAME}"
269 # same as above, but for CMake
270 .build_examples_cmake_template: &build_examples_cmake_template
275 - build_examples_cmake/*/*/*/build/*.bin
276 - build_examples_cmake/*/*/*/build/*.elf
277 - build_examples_cmake/*/*/*/build/*.map
278 - build_examples_cmake/*/*/*/build/download.config
279 - build_examples_cmake/*/*/*/build/bootloader/*.bin
284 LOG_PATH: "$CI_PROJECT_DIR/log_examples_cmake"
287 - $BOT_TRIGGER_WITH_LABEL == null
289 - $BOT_LABEL_EXAMPLE_TEST
290 - $BOT_LABEL_REGULAR_TEST
292 # it's not possible to build 100% out-of-tree and have the "artifacts"
293 # mechanism work, but this is the next best thing
294 - rm -rf build_examples_cmake
295 - mkdir build_examples_cmake
296 - cd build_examples_cmake
297 # build some of examples
298 - mkdir -p ${LOG_PATH}
299 - ${IDF_PATH}/tools/ci/build_examples_cmake.sh "${CI_JOB_NAME}"
301 build_examples_make_00:
302 <<: *build_examples_make_template
304 build_examples_make_01:
305 <<: *build_examples_make_template
307 build_examples_make_02:
308 <<: *build_examples_make_template
310 build_examples_make_03:
311 <<: *build_examples_make_template
313 build_examples_make_04:
314 <<: *build_examples_make_template
316 build_examples_make_05:
317 <<: *build_examples_make_template
319 build_examples_make_06:
320 <<: *build_examples_make_template
322 build_examples_make_07:
323 <<: *build_examples_make_template
325 build_examples_cmake_00:
326 <<: *build_examples_cmake_template
328 build_examples_cmake_01:
329 <<: *build_examples_cmake_template
331 build_examples_cmake_02:
332 <<: *build_examples_cmake_template
334 build_examples_cmake_03:
335 <<: *build_examples_cmake_template
337 build_examples_cmake_04:
338 <<: *build_examples_cmake_template
340 build_examples_cmake_05:
341 <<: *build_examples_cmake_template
343 build_examples_cmake_06:
344 <<: *build_examples_cmake_template
346 build_examples_cmake_07:
347 <<: *build_examples_cmake_template
349 # If you want to add new build example jobs, please add it into dependencies of `.example_test_template`
353 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
359 # English version of documentation
360 - docs/en/doxygen-warning-log.txt
361 - docs/en/sphinx-warning-log.txt
362 - docs/en/sphinx-warning-log-sanitized.txt
363 - docs/en/_build/html
365 # Chinese version of documentation
366 - docs/zh_CN/doxygen-warning-log.txt
367 - docs/zh_CN/sphinx-warning-log.txt
368 - docs/zh_CN/sphinx-warning-log-sanitized.txt
369 - docs/zh_CN/_build/html
373 - $BOT_TRIGGER_WITH_LABEL == null
375 - $BOT_LABEL_BUILD_DOCS
376 - $BOT_LABEL_REGULAR_TEST
379 - ./check_lang_folder_sync.sh
383 - ../check_doc_warnings.sh
387 - ../check_doc_warnings.sh
391 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
394 - $BOT_TRIGGER_WITH_LABEL == null
396 - $BOT_LABEL_REGULAR_TEST
398 tools/cmake/run_cmake_lint.sh
400 .host_test_template: &host_test_template
402 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
408 - $BOT_TRIGGER_WITH_LABEL == null
409 - $BOT_LABEL_HOST_TEST
410 - $BOT_LABEL_REGULAR_TEST
413 <<: *host_test_template
415 - cd components/nvs_flash/test_nvs_host
419 <<: *host_test_template
422 - components/nvs_flash/test_nvs_host/coverage_report
428 - $BOT_LABEL_NVS_COVERAGE
430 - cd components/nvs_flash/test_nvs_host
431 - make coverage_report
433 test_partition_table_on_host:
434 <<: *host_test_template
438 - cd components/partition_table/test_gen_esp32part_host
439 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./gen_esp32part_tests.py
442 <<: *host_test_template
445 - components/wear_levelling/test_wl_host/coverage_report.zip
448 - cd components/wear_levelling/test_wl_host
452 <<: *host_test_template
454 - cd components/fatfs/test_fatfs_host/
458 <<: *host_test_template
460 - cd tools/ldgen/test
461 - ./test_fragments.py
462 - ./test_generation.py
464 .host_fuzzer_test_template: &host_fuzzer_test_template
466 image: $CI_DOCKER_REGISTRY/afl-fuzzer-test
473 - ${FUZZER_TEST_DIR}/out/crashes
474 - ${FUZZER_TEST_DIR}/fuzz_output.log
478 # can only be triggered
481 - $BOT_LABEL_FUZZER_TEST
483 - export AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES=1 && export AFL_SKIP_CPUFREQ=1
484 - cd ${FUZZER_TEST_DIR}
485 # run AFL fuzzer for one hour
486 - ( ( make ${FUZZER_PARAMS} fuzz | tee fuzz_output.log | grep -v '\(Fuzzing test case\|Entering queue cycle\)' ) || pkill sleep ) &
487 - ( sleep 3600 || mkdir -p out/crashes/env_failed ) && pkill afl-fuz
488 # check no crashes found
489 - test -z "$(ls out/crashes/)" || exit 1
491 test_mdns_fuzzer_on_host:
492 <<: *host_fuzzer_test_template
494 BOT_NEEDS_TRIGGER_BY_NAME: 1
495 FUZZER_TEST_DIR: components/mdns/test_afl_fuzz_host
497 test_lwip_dns_fuzzer_on_host:
498 <<: *host_fuzzer_test_template
500 BOT_NEEDS_TRIGGER_BY_NAME: 1
501 FUZZER_TEST_DIR: components/lwip/test_afl_host
502 FUZZER_PARAMS: MODE=dns
504 test_lwip_dhcp_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=dhcp_client
511 test_lwip_dhcps_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_server
519 <<: *host_test_template
521 - cd components/spiffs/test_spiffs_host/
524 test_multi_heap_on_host:
525 <<: *host_test_template
527 - cd components/heap/test_multi_heap_host
528 - ./test_all_configs.sh
531 <<: *host_test_template
533 - cd tools/kconfig_new/test
534 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./test_confserver.py
537 <<: *host_test_template
539 - ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh
540 - rm -rf test_build_system
541 - mkdir test_build_system
542 - cd test_build_system
543 - ${IDF_PATH}/tools/ci/test_build_system.sh
545 test_build_system_cmake:
546 <<: *host_test_template
548 - ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh
549 - rm -rf test_build_system
550 - mkdir test_build_system
551 - cd test_build_system
552 - ${IDF_PATH}/tools/ci/test_build_system_cmake.sh
555 <<: *host_test_template
559 - tools/test_idf_monitor/outputs/*
562 - cd ${IDF_PATH}/tools/test_idf_monitor
563 - ./run_test_idf_monitor.py
566 <<: *host_test_template
570 - tools/test_idf_size/output
571 - tools/test_idf_size/.coverage
574 - cd ${IDF_PATH}/tools/test_idf_size
575 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./test.sh
577 test_esp_err_to_name_on_host:
578 <<: *host_test_template
582 - components/esp32/esp_err_to_name.c
585 - cd ${IDF_PATH}/tools/
586 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh -p 2.7.15 ./gen_esp_err_to_name.py
587 - 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)
588 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh -p 3.4.8 ./gen_esp_err_to_name.py
589 - git diff --exit-code -- ../components/esp32/esp_err_to_name.c || (echo 'Differences found between running under Python 2 and 3.'; exit 1)
592 <<: *host_test_template
596 - components/espcoredump/test/.coverage
597 - components/espcoredump/test/output
600 - cd components/espcoredump/test/
601 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./test_espcoredump.sh
605 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
611 - /^v\d+\.\d+(\.\d+)?($|-)/
614 before_script: *do_nothing_before
618 - echo -n $GH_PUSH_KEY > ~/.ssh/id_rsa_base64
619 - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
620 - chmod 600 ~/.ssh/id_rsa
621 - echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
622 - git remote remove github &>/dev/null || true
623 - git remote add github git@github.com:espressif/esp-idf.git
624 - tools/ci/push_to_github.sh
628 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
635 - /^v\d+\.\d+(\.\d+)?($|-)/
638 - $BOT_TRIGGER_WITH_LABEL == null
639 - $BOT_LABEL_BUILD_DOCS
642 before_script: *do_nothing_before
646 - echo -n $DOCS_DEPLOY_KEY > ~/.ssh/id_rsa_base64
647 - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
648 - chmod 600 ~/.ssh/id_rsa
649 - echo -e "Host $DOCS_SERVER\n\tStrictHostKeyChecking no\n\tUser $DOCS_SERVER_USER\n" >> ~/.ssh/config
650 - export GIT_VER=$(git describe --always)
653 - tar czvf $GIT_VER.tar.gz $GIT_VER
654 - scp $GIT_VER.tar.gz $DOCS_SERVER:$DOCS_PATH/en
655 - ssh $DOCS_SERVER -x "cd $DOCS_PATH/en && tar xzvf $GIT_VER.tar.gz && rm -f latest && ln -s $GIT_VER latest"
656 - cd ../../zh_CN/_build/
658 - tar czvf $GIT_VER.tar.gz $GIT_VER
659 - scp $GIT_VER.tar.gz $DOCS_SERVER:$DOCS_PATH/zh_CN
660 - ssh $DOCS_SERVER -x "cd $DOCS_PATH/zh_CN && tar xzvf $GIT_VER.tar.gz && rm -f latest && ln -s $GIT_VER latest"
661 # add link to preview doc
662 - echo "[document preview][en] $CI_DOCKER_REGISTRY/docs/esp-idf/en/${GIT_VER}/index.html"
663 - echo "[document preview][zh_CN] $CI_DOCKER_REGISTRY/docs/esp-idf/zh_CN/${GIT_VER}/index.html"
667 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
672 # can only be triggered
675 - $BOT_TRIGGER_WITH_LABEL == null
676 - $BOT_LABEL_BUILD_DOCS
679 - docs/_build/linkcheck
682 # must be triggered with CHECK_LINKS=Yes, otherwise exit without test
683 - test "$CHECK_LINKS" = "Yes" || exit 0
684 # can only run on master branch (otherwise the commit is not on Github yet)
685 - test "${CI_COMMIT_REF_NAME}" = "master" || exit 0
689 .check_job_template: &check_job_template
691 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
695 before_script: *do_nothing_before_no_filter
698 <<: *check_job_template
700 - tools/ci/check-line-endings.sh ${IDF_PATH}
703 <<: *check_job_template
706 - git log -n10 --oneline
707 # commit start with "WIP: " need to be squashed before merge
708 - 'git log --pretty=%s master.. -- | grep "^WIP: " && exit 1 || exit 0'
711 <<: *check_job_template
713 - tools/ci/check-executable.sh
715 check_examples_cmake_make:
716 <<: *check_job_template
720 - /^v\d+\.\d+(\.\d+)?($|-)/
721 before_script: *do_nothing_before
723 - tools/ci/check_examples_cmake_make.sh
727 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
733 - /^v\d+\.\d+(\.\d+)?($|-)/
735 before_script: *do_nothing_before
737 - tools/ci/check_ut_cmake_make.sh
739 check_submodule_sync:
740 <<: *check_job_template
744 # check if all submodules are correctly synced to public repostory
745 - git submodule update --init --recursive
747 check_artifacts_expire_time:
748 <<: *check_job_template
750 # check if we have set expire time for all artifacts
751 - python tools/ci/check_artifacts_expire_time.py
753 check_pipeline_triggered_by_label:
754 <<: *check_job_template
758 - $BOT_TRIGGER_WITH_LABEL
760 # If the pipeline is triggered with label, the pipeline will only succeeded if "regular_test" label is added.
761 # We want to make sure some jobs are always executed to detect regression.
762 - test "$BOT_LABEL_REGULAR_TEST" = "true" || exit -1
767 image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG
769 # gitlab ci do not support match job with RegEx or wildcard now in dependencies.
770 # we have a lot build example jobs. now we don't use dependencies, just download all artificats of build stage.
775 - build_esp_idf_tests_make
776 - build_esp_idf_tests_cmake
778 TEST_FW_PATH: "$CI_PROJECT_DIR/tools/tiny-test-fw"
779 EXAMPLE_CONFIG_OUTPUT_PATH: "$CI_PROJECT_DIR/examples/test_configs"
782 - components/idf_test/*/CIConfigs
783 - components/idf_test/*/TC.sqlite
784 - $EXAMPLE_CONFIG_OUTPUT_PATH
788 - $BOT_TRIGGER_WITH_LABEL == null
789 - $BOT_LABEL_UNIT_TEST
790 - $BOT_LABEL_INTEGRATION_TEST
791 - $BOT_LABEL_EXAMPLE_TEST
792 before_script: *add_gitlab_key_before
794 # assign example tests
795 - python $TEST_FW_PATH/CIAssignExampleTest.py $IDF_PATH/examples $IDF_PATH/.gitlab-ci.yml $EXAMPLE_CONFIG_OUTPUT_PATH
796 # assign unit test cases
797 - 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
798 # clone test script to assign tests
799 - git clone $TEST_SCRIPT_REPOSITORY
800 - cd auto_test_script
801 - python $CHECKOUT_REF_SCRIPT auto_test_script
802 # assgin integration test cases
803 - python CIAssignTestCases.py -t $IDF_PATH/components/idf_test/integration_test -c $IDF_PATH/.gitlab-ci.yml -b $IDF_PATH/SSC/ssc_bin
805 .example_test_template: &example_test_template
806 stage: integration_test
812 - /^v\d+\.\d+(\.\d+)?($|-)/
816 - $BOT_TRIGGER_WITH_LABEL == null
817 - $BOT_LABEL_EXAMPLE_TEST
820 - build_examples_make_00
821 - build_examples_make_01
822 - build_examples_make_02
823 - build_examples_make_03
824 - build_examples_make_04
825 - build_examples_make_05
826 - build_examples_make_06
827 - build_examples_make_07
828 - build_examples_cmake_00
829 - build_examples_cmake_01
830 - build_examples_cmake_02
831 - build_examples_cmake_03
832 - build_examples_cmake_04
833 - build_examples_cmake_05
834 - build_examples_cmake_06
835 - build_examples_cmake_07
842 junit: $LOG_PATH/*/XUNIT_RESULT.xml
844 TEST_FW_PATH: "$CI_PROJECT_DIR/tools/tiny-test-fw"
845 TEST_CASE_PATH: "$CI_PROJECT_DIR/examples"
846 CONFIG_FILE: "$CI_PROJECT_DIR/examples/test_configs/$CI_JOB_NAME.yml"
847 LOG_PATH: "$CI_PROJECT_DIR/TEST_LOGS"
848 ENV_FILE: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/EnvConfig.yml"
850 # first test if config file exists, if not exist, exit 0
851 - test -e $CONFIG_FILE || exit 0
852 # clone test env configs
853 - git clone $TEST_ENV_CONFIG_REPOSITORY
854 - cd ci-test-runner-configs
855 - python $CHECKOUT_REF_SCRIPT ci-test-runner-configs
858 - python Runner.py $TEST_CASE_PATH -c $CONFIG_FILE -e $ENV_FILE
860 .unit_test_template: &unit_test_template
861 <<: *example_test_template
865 - build_esp_idf_tests_make
866 - build_esp_idf_tests_cmake
871 - /^v\d+\.\d+(\.\d+)?($|-)/
875 - $BOT_TRIGGER_WITH_LABEL == null
876 - $BOT_LABEL_UNIT_TEST
878 TEST_FW_PATH: "$CI_PROJECT_DIR/tools/tiny-test-fw"
879 TEST_CASE_PATH: "$CI_PROJECT_DIR/tools/unit-test-app"
880 CONFIG_FILE: "$CI_PROJECT_DIR/components/idf_test/unit_test/CIConfigs/$CI_JOB_NAME.yml"
881 LOG_PATH: "$CI_PROJECT_DIR/TEST_LOGS"
882 ENV_FILE: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/EnvConfig.yml"
884 .test_template: &test_template
885 stage: integration_test
891 - /^v\d+\.\d+(\.\d+)?($|-)/
895 - $BOT_TRIGGER_WITH_LABEL == null
896 - $BOT_LABEL_INTEGRATION_TEST
908 LOCAL_ENV_CONFIG_PATH: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/ESP32_IDF"
909 LOG_PATH: "$CI_PROJECT_DIR/$CI_COMMIT_SHA"
910 TEST_CASE_FILE_PATH: "$CI_PROJECT_DIR/components/idf_test/integration_test"
911 MODULE_UPDATE_FILE: "$CI_PROJECT_DIR/components/idf_test/ModuleDefinition.yml"
912 CONFIG_FILE: "$CI_PROJECT_DIR/components/idf_test/integration_test/CIConfigs/$CI_JOB_NAME.yml"
913 before_script: *add_gitlab_key_before
915 # first test if config file exists, if not exist, exit 0
916 - test -e $CONFIG_FILE || exit 0
917 # clone local test env configs
918 - git clone $TEST_ENV_CONFIG_REPOSITORY
919 - cd ci-test-runner-configs
920 - python $CHECKOUT_REF_SCRIPT ci-test-runner-configs
922 - git clone $TEST_SCRIPT_REPOSITORY
923 - cd auto_test_script
924 - python $CHECKOUT_REF_SCRIPT auto_test_script
926 - 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
940 # clone local test env configs
941 - git clone $TEST_ENV_CONFIG_REPOSITORY
942 - cd ci-test-runner-configs
943 - python $CHECKOUT_REF_SCRIPT ci-test-runner-configs
945 - git clone $TEST_SCRIPT_REPOSITORY
946 - cd auto_test_script
947 - git checkout ${CI_COMMIT_REF_NAME} || echo "Using default branch..."
949 - ./Tools/prepare_nvs_bin.sh
951 - 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
954 <<: *example_test_template
960 <<: *example_test_template
966 <<: *example_test_template
967 image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG
970 - Example_ShieldBox_Basic
973 <<: *example_test_template
979 <<: *example_test_template
985 <<: *example_test_template
991 <<: *example_test_template
992 image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG
995 - $BOT_LABEL_IPERF_STRESS_TEST
1001 <<: *unit_test_template
1007 <<: *unit_test_template
1013 <<: *unit_test_template
1019 <<: *unit_test_template
1025 <<: *unit_test_template
1031 <<: *unit_test_template
1037 <<: *unit_test_template
1043 <<: *unit_test_template
1049 <<: *unit_test_template
1055 <<: *unit_test_template
1061 <<: *unit_test_template
1067 <<: *unit_test_template
1073 <<: *unit_test_template
1079 <<: *unit_test_template
1085 <<: *unit_test_template
1091 <<: *unit_test_template
1097 <<: *unit_test_template
1103 <<: *unit_test_template
1109 <<: *unit_test_template
1115 <<: *unit_test_template
1121 <<: *unit_test_template
1127 <<: *unit_test_template
1133 <<: *unit_test_template
1139 <<: *unit_test_template
1145 <<: *unit_test_template
1151 <<: *unit_test_template
1157 <<: *unit_test_template
1163 <<: *unit_test_template
1169 <<: *unit_test_template
1175 <<: *unit_test_template
1181 <<: *unit_test_template
1187 <<: *unit_test_template
1193 <<: *unit_test_template
1199 <<: *unit_test_template
1205 <<: *unit_test_template
1211 <<: *unit_test_template
1217 <<: *unit_test_template
1223 <<: *unit_test_template
1229 <<: *unit_test_template
1235 <<: *unit_test_template
1241 <<: *unit_test_template
1247 <<: *unit_test_template
1253 <<: *unit_test_template
1259 <<: *unit_test_template
1265 <<: *unit_test_template
1271 <<: *unit_test_template
1277 <<: *unit_test_template
1284 <<: *unit_test_template
1291 <<: *unit_test_template
1298 <<: *unit_test_template
1305 <<: *unit_test_template
1312 <<: *unit_test_template
1319 <<: *unit_test_template
1326 <<: *unit_test_template
1333 <<: *unit_test_template
1340 <<: *unit_test_template
1347 <<: *unit_test_template
1354 <<: *unit_test_template
1361 <<: *unit_test_template
1368 <<: *unit_test_template
1375 <<: *unit_test_template
1382 <<: *unit_test_template
1389 <<: *unit_test_template
1396 <<: *unit_test_template
1403 <<: *unit_test_template
1409 <<: *unit_test_template
1415 <<: *unit_test_template
1421 <<: *unit_test_template
1428 <<: *unit_test_template
1434 <<: *unit_test_template
1440 <<: *unit_test_template
1446 <<: *unit_test_template
1453 <<: *unit_test_template
1459 <<: *unit_test_template
1465 <<: *unit_test_template
1471 <<: *unit_test_template
1478 <<: *unit_test_template
1484 <<: *unit_test_template
1490 <<: *unit_test_template
1496 <<: *unit_test_template
1503 <<: *unit_test_template
1509 <<: *unit_test_template
1515 <<: *unit_test_template
1521 <<: *unit_test_template
1528 <<: *unit_test_template
1534 <<: *unit_test_template
1540 <<: *unit_test_template
1546 <<: *unit_test_template
1553 <<: *unit_test_template
1560 <<: *unit_test_template
1567 <<: *unit_test_template
1574 <<: *unit_test_template
1581 <<: *unit_test_template