| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471 |
- .host_test_template:
- extends: .rules:test:host_test
- stage: host_test
- image: $ESP_ENV_IMAGE
- tags:
- - host_test
- dependencies: []
- # run host_test jobs immediately, only after upload cache
- needs:
- - job: upload-pip-cache
- optional: true
- artifacts: false
- - job: upload-submodules-cache
- optional: true
- artifacts: false
- test_nvs_on_host:
- extends: .host_test_template
- script:
- - cd components/nvs_flash/test_nvs_host
- - make test
- test_nvs_coverage:
- extends:
- - .host_test_template
- - .rules:labels:nvs_coverage
- artifacts:
- paths:
- - components/nvs_flash/test_nvs_host/coverage_report
- expire_in: 1 week
- script:
- - cd components/nvs_flash/test_nvs_host
- - make coverage_report
- # the 'long' host tests take approx 11 hours on our current runners. Adding some margin here for possible CPU contention
- timeout: 18 hours
- test_partition_table_on_host:
- extends: .host_test_template
- tags:
- - build
- script:
- - cd components/partition_table/test_gen_esp32part_host
- - ./gen_esp32part_tests.py
- test_wl_on_host:
- extends: .host_test_template
- artifacts:
- paths:
- - components/wear_levelling/test_wl_host/coverage_report.zip
- expire_in: 1 week
- script:
- - cd components/wear_levelling/test_wl_host
- - make test
- test_fatfs_on_host:
- extends: .host_test_template
- script:
- - cd components/fatfs/test_fatfs_host/
- - make test
- test_ldgen_on_host:
- extends: .host_test_template
- script:
- - cd tools/ldgen/test
- - export PYTHONPATH=$PYTHONPATH:..
- - python -m unittest
- variables:
- LC_ALL: C.UTF-8
- test_reproducible_build:
- extends: .host_test_template
- script:
- - ./tools/ci/test_reproducible_build.sh
- artifacts:
- when: on_failure
- paths:
- - "**/sdkconfig"
- - "**/build*/*.bin"
- - "**/build*/*.elf"
- - "**/build*/*.map"
- - "**/build*/flasher_args.json"
- - "**/build*/*.bin"
- - "**/build*/bootloader/*.bin"
- - "**/build*/partition_table/*.bin"
- expire_in: 1 week
- .host_fuzzer_test_template:
- extends:
- - .host_test_template
- - .rules:labels:fuzzer_test-weekend_test
- image: $AFL_FUZZER_TEST_IMAGE
- artifacts:
- when: always
- paths:
- - ${FUZZER_TEST_DIR}/out/crashes
- - ${FUZZER_TEST_DIR}/fuzz_output.log
- expire_in: 1 week
- script:
- - export AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES=1 && export AFL_SKIP_CPUFREQ=1
- - cd ${FUZZER_TEST_DIR}
- # run AFL fuzzer for one hour
- - ( ( make ${FUZZER_PARAMS} fuzz | tee fuzz_output.log | grep -v '\(Fuzzing test case\|Entering queue cycle\)' ) || pkill sleep ) &
- - ( sleep 3600 || mkdir -p out/crashes/env_failed ) && pkill afl-fuz
- # check no crashes found
- - test -z "$(ls out/crashes/)" || exit 1
- test_lwip_dns_fuzzer_on_host:
- extends: .host_fuzzer_test_template
- variables:
- FUZZER_TEST_DIR: components/lwip/test_afl_host
- FUZZER_PARAMS: MODE=dns
- test_lwip_dhcp_fuzzer_on_host:
- extends: .host_fuzzer_test_template
- variables:
- FUZZER_TEST_DIR: components/lwip/test_afl_host
- FUZZER_PARAMS: MODE=dhcp_client
- test_lwip_dhcps_fuzzer_on_host:
- extends: .host_fuzzer_test_template
- variables:
- FUZZER_TEST_DIR: components/lwip/test_afl_host
- FUZZER_PARAMS: MODE=dhcp_server
- test_spiffs_on_host:
- extends: .host_test_template
- script:
- - cd components/spiffs/test_spiffs_host/
- - make test
- - cd ../test_spiffsgen
- - ./test_spiffsgen.py
- test_fatfsgen_on_host:
- extends: .host_test_template
- script:
- - cd components/fatfs/test_fatfsgen/
- - ./test_fatfsgen.py
- - ./test_wl_fatfsgen.py
- - ./test_fatfsparse.py
- test_multi_heap_on_host:
- extends: .host_test_template
- script:
- - cd components/heap/test_multi_heap_host
- - ./test_all_configs.sh
- test_certificate_bundle_on_host:
- extends: .host_test_template
- tags:
- - build
- script:
- - cd components/mbedtls/esp_crt_bundle/test_gen_crt_bundle/
- - ./test_gen_crt_bundle.py
- test_confserver:
- extends: .host_test_template
- script:
- - cd tools/kconfig_new/test/confserver
- - ./test_confserver.py
- test_gen_kconfig_doc:
- extends: .host_test_template
- script:
- - cd tools/kconfig_new/test/gen_kconfig_doc/
- - ./test_target_visibility.py
- - ./test_kconfig_out.py
- test_confgen:
- extends: .host_test_template
- script:
- - cd tools/kconfig_new/test/confgen/
- - ./test_confgen.py
- test_idf_monitor:
- extends: .host_test_template
- artifacts:
- # save artifacts always in order to access results which were retried without consequent failure
- when: always
- paths:
- - tools/test_idf_monitor/outputs/*
- expire_in: 1 week
- script:
- - eval $($IDF_PATH/tools/idf_tools.py export)
- - cd ${IDF_PATH}/tools/test_idf_monitor
- - ./run_test_idf_monitor.py
- test_idf_size:
- extends: .host_test_template
- artifacts:
- when: on_failure
- paths:
- - tools/test_idf_size/output
- - tools/test_idf_size/.coverage
- expire_in: 1 week
- script:
- - cd ${IDF_PATH}/tools/test_idf_size
- - ./test.sh
- test_idf_py:
- extends: .host_test_template
- variables:
- LC_ALL: C.UTF-8
- script:
- - cd ${IDF_PATH}/tools/test_idf_py
- - ./test_idf_py.py
- # Test for create virtualenv. It must be invoked from Python, not from virtualenv.
- # Use docker image system python without any extra dependencies
- test_idf_tools:
- extends:
- - .host_test_template
- - .before_script_minimal
- artifacts:
- when: on_failure
- paths:
- - tools/tools.new.json
- - tools/test_idf_tools/test_python_env_logs.txt
- expire_in: 1 week
- image:
- name: $ESP_ENV_IMAGE
- entrypoint: [""] # use system python3. no extra pip package installed
- script:
- - cd ${IDF_PATH}/tools/test_idf_tools
- - python3 -m pip install jsonschema
- - python3 ./test_idf_tools.py
- - python3 ./test_idf_tools_python_env.py
- .test_efuse_table_on_host_template:
- extends: .host_test_template
- variables:
- IDF_TARGET: "esp32"
- artifacts:
- when: on_failure
- paths:
- - components/efuse/${IDF_TARGET}/esp_efuse_table.c
- expire_in: 1 week
- script:
- - cd ${IDF_PATH}/components/efuse/
- - ./efuse_table_gen.py -t "${IDF_TARGET}" ${IDF_PATH}/components/efuse/${IDF_TARGET}/esp_efuse_table.csv
- - git diff --exit-code -- ${IDF_TARGET}/esp_efuse_table.c || { echo 'Differences found for ${IDF_TARGET} target. Please run make efuse_common_table or idf.py efuse-common-table and commit the changes.'; exit 1; }
- - cd ${IDF_PATH}/components/efuse/test_efuse_host
- - ./efuse_tests.py
- test_efuse_table_on_host_esp32:
- extends: .test_efuse_table_on_host_template
- test_efuse_table_on_host_esp32s2:
- extends: .test_efuse_table_on_host_template
- variables:
- IDF_TARGET: esp32s2
- test_efuse_table_on_host_esp32s3:
- extends: .test_efuse_table_on_host_template
- variables:
- IDF_TARGET: esp32s3
- test_efuse_table_on_host_esp32c3:
- extends: .test_efuse_table_on_host_template
- variables:
- IDF_TARGET: esp32c3
- test_efuse_table_on_host_esp32h2:
- extends: .test_efuse_table_on_host_template
- variables:
- IDF_TARGET: esp32h2
- test_espcoredump:
- extends: .host_test_template
- artifacts:
- when: always
- paths:
- - components/espcoredump/test/**/.coverage
- - components/espcoredump/test/**/output
- expire_in: 1 week
- variables:
- IDF_COREDUMP_ELF_REPO: "https://gitlab-ci-token:${BOT_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/idf/idf-coredump-elf.git"
- IDF_COREDUMP_ELF_TAG: idf-20210915
- # install CMake version specified in tools.json
- SETUP_TOOLS_LIST: "all"
- script:
- - eval $($IDF_PATH/tools/idf_tools.py export)
- - retry_failed git clone ${IDF_COREDUMP_ELF_REPO} -b $IDF_COREDUMP_ELF_TAG
- - cd ${IDF_PATH}/components/espcoredump/test/
- - ./test_espcoredump.sh ${CI_PROJECT_DIR}/idf-coredump-elf
- test_logtrace_proc:
- extends: .host_test_template
- artifacts:
- when: on_failure
- paths:
- - tools/esp_app_trace/test/logtrace/output
- - tools/esp_app_trace/test/logtrace/.coverage
- expire_in: 1 week
- script:
- - cd ${IDF_PATH}/tools/esp_app_trace/test/logtrace
- - ./test.sh
- test_sysviewtrace_proc:
- extends: .host_test_template
- artifacts:
- when: on_failure
- paths:
- - tools/esp_app_trace/test/sysview/output
- - tools/esp_app_trace/test/sysview/.coverage
- expire_in: 1 week
- script:
- - cd ${IDF_PATH}/tools/esp_app_trace/test/sysview
- - ./test.sh
- test_mkdfu:
- extends: .host_test_template
- variables:
- LC_ALL: C.UTF-8
- script:
- - cd ${IDF_PATH}/tools/test_mkdfu
- - ./test_mkdfu.py
- test_mkuf2:
- extends: .host_test_template
- script:
- - cd ${IDF_PATH}/tools/test_mkuf2
- - ./test_mkuf2.py
- test_autocomplete:
- extends:
- - .host_test_template
- artifacts:
- when: on_failure
- paths:
- - ${IDF_PATH}/*.out
- expire_in: 1 week
- script:
- - ${IDF_PATH}/tools/ci/test_autocomplete.py
- test_detect_python:
- extends:
- - .host_test_template
- script:
- - cd ${IDF_PATH}
- - shellcheck -s sh tools/detect_python.sh
- - shellcheck -s bash tools/detect_python.sh
- - shellcheck -s dash tools/detect_python.sh
- - "bash -c '. tools/detect_python.sh && echo Our Python: ${ESP_PYTHON?Python is not set}'"
- - "dash -c '. tools/detect_python.sh && echo Our Python: ${ESP_PYTHON?Python is not set}'"
- - "zsh -c '. tools/detect_python.sh && echo Our Python: ${ESP_PYTHON?Python is not set}'"
- - "fish -c 'source tools/detect_python.fish && echo Our Python: $ESP_PYTHON'"
- test_split_path_by_spaces:
- extends: .host_test_template
- script:
- - cd ${IDF_PATH}/tools
- - python -m unittest split_paths_by_spaces.py
- test_nvs_page:
- extends: .host_test_template
- script:
- - cd ${IDF_PATH}/components/nvs_flash/host_test/nvs_page_test
- - idf.py build
- - build/test_nvs_page_host.elf
- test_mqtt_on_host:
- extends: .host_test_template
- script:
- - cd ${IDF_PATH}/components/mqtt/host_test
- - idf.py build
- - LSAN_OPTIONS=verbosity=1:log_threads=1 build/host_mqtt_client_test.elf
- test_log:
- extends: .host_test_template
- script:
- - cd ${IDF_PATH}/components/log/host_test/log_test
- - idf.py build
- - build/test_log_host.elf
- test_esp_event:
- extends: .host_test_template
- script:
- - cd ${IDF_PATH}/components/esp_event/host_test/esp_event_unit_test
- - idf.py build
- - build/test_esp_event_host.elf
- test_esp_timer_cxx:
- extends: .host_test_template
- script:
- - cd ${IDF_PATH}/examples/cxx/experimental/experimental_cpp_component/host_test/esp_timer
- - idf.py build
- - build/test_esp_timer_cxx_host.elf
- test_eh_frame_parser:
- extends: .host_test_template
- script:
- - cd ${IDF_PATH}/components/esp_system/test_eh_frame_parser
- - make
- - ./eh_frame_test
- test_rom_on_linux_works:
- extends: .host_test_template
- script:
- - cd ${IDF_PATH}/components/esp_rom/host_test/rom_test
- - idf.py build
- - build/test_rom_host.elf
- test_cxx_gpio:
- extends: .host_test_template
- script:
- - cd ${IDF_PATH}/examples/cxx/experimental/experimental_cpp_component/host_test/gpio
- - idf.py build
- - build/test_gpio_cxx_host.elf
- test_i2c_cxx:
- extends: .host_test_template
- script:
- - cd ${IDF_PATH}/examples/cxx/experimental/experimental_cpp_component/host_test/i2c
- - idf.py build
- - build/test_i2c_cxx_host.elf
- test_spi_cxx:
- extends: .host_test_template
- script:
- - cd ${IDF_PATH}/examples/cxx/experimental/experimental_cpp_component/host_test/spi
- - idf.py build
- - build/test_spi_cxx_host.elf
- test_system_cxx:
- extends: .host_test_template
- script:
- - cd ${IDF_PATH}/examples/cxx/experimental/experimental_cpp_component/host_test/system
- - idf.py build
- - build/test_system_cxx_host.elf
- test_linux_example:
- extends: .host_test_template
- script:
- - cd ${IDF_PATH}/examples/build_system/cmake/linux_host_app
- - idf.py build
- - timeout 5 ./build/linux_host_app.elf >test.log || true
- - grep "Restarting" test.log
- test_partition_api_host:
- extends: .host_test_template
- script:
- - cd ${IDF_PATH}/components/spi_flash/host_test/partition_api_test
- - idf.py build
- - timeout 5 ./build/partition_api_test.elf >test.log
- - grep " 0 Failures" test.log
- test_gen_soc_caps_kconfig:
- extends: .host_test_template
- script:
- - cd ${IDF_PATH}/tools/gen_soc_caps_kconfig/
- - ./test/test_gen_soc_caps_kconfig.py
- test_pytest_qemu:
- extends:
- - .host_test_template
- - .before_script_build_jobs
- image: $QEMU_IMAGE
- artifacts:
- when: always
- paths:
- - XUNIT_RESULT.xml
- - pytest_embedded_log/
- reports:
- junit: XUNIT_RESULT.xml
- expire_in: 1 week
- script:
- - run_cmd python tools/ci/ci_build_apps.py . -vv
- --target esp32
- --pytest-apps
- -m qemu
- - pytest --target esp32 -m qemu --embedded-services idf,qemu --junitxml=XUNIT_RESULT.xml
|