2019-06-28 12:39:21 -04:00
.host_test_template :
2021-02-08 23:31:38 -05:00
extends : .rules:test:host_test
2019-06-28 12:39:21 -04:00
stage : host_test
2021-05-26 04:44:20 -04:00
image : $ESP_ENV_IMAGE
2019-06-28 12:39:21 -04:00
tags :
- host_test
2023-07-18 22:19:44 -04:00
dependencies : # set dependencies to null to avoid missing artifacts issue
2022-07-12 04:48:54 -04:00
# run host_test jobs immediately, only after upload cache
2022-06-06 21:05:15 -04:00
needs :
2022-07-12 04:48:54 -04:00
- job : upload-pip-cache
optional : true
artifacts : false
- job : upload-submodules-cache
optional : true
artifacts : false
2023-11-01 07:43:19 -04:00
- pipeline_variables
2019-06-28 12:39:21 -04:00
test_nvs_on_host :
extends : .host_test_template
script :
- cd components/nvs_flash/test_nvs_host
2021-05-26 04:44:20 -04:00
- make test
2019-06-28 12:39:21 -04:00
test_nvs_coverage :
2020-09-26 23:20:53 -04:00
extends :
- .host_test_template
2021-02-08 23:31:38 -05:00
- .rules:labels:nvs_coverage
2019-06-28 12:39:21 -04:00
artifacts :
paths :
- components/nvs_flash/test_nvs_host/coverage_report
script :
- cd components/nvs_flash/test_nvs_host
- make coverage_report
2021-01-05 01:39:50 -05:00
# the 'long' host tests take approx 11 hours on our current runners. Adding some margin here for possible CPU contention
timeout : 18 hours
2019-06-28 12:39:21 -04:00
test_partition_table_on_host :
extends : .host_test_template
script :
- cd components/partition_table/test_gen_esp32part_host
2021-05-26 04:44:20 -04:00
- ./gen_esp32part_tests.py
2019-06-28 12:39:21 -04:00
test_ldgen_on_host :
extends : .host_test_template
script :
- cd tools/ldgen/test
2021-12-24 05:03:13 -05:00
- export PYTHONPATH=$PYTHONPATH:..
2021-12-23 20:41:47 -05:00
- python -m unittest
2020-11-10 22:31:17 -05:00
variables :
LC_ALL : C.UTF-8
2019-06-28 12:39:21 -04:00
2021-10-09 03:42:14 -04:00
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"
2019-06-28 12:39:21 -04:00
test_spiffs_on_host :
extends : .host_test_template
script :
2022-08-25 09:23:59 -04:00
- cd components/spiffs/test_spiffsgen/
2021-05-26 04:44:20 -04:00
- ./test_spiffsgen.py
2019-06-28 12:39:21 -04:00
2021-09-21 18:32:54 -04:00
test_fatfsgen_on_host :
extends : .host_test_template
script :
- cd components/fatfs/test_fatfsgen/
- ./test_fatfsgen.py
2021-09-21 18:32:54 -04:00
- ./test_wl_fatfsgen.py
2022-04-04 09:33:00 -04:00
- ./test_fatfsparse.py
2021-09-21 18:32:54 -04:00
2019-06-28 12:39:21 -04:00
test_multi_heap_on_host :
extends : .host_test_template
script :
- cd components/heap/test_multi_heap_host
- ./test_all_configs.sh
2019-09-29 06:04:34 -04:00
test_certificate_bundle_on_host :
extends : .host_test_template
script :
- cd components/mbedtls/esp_crt_bundle/test_gen_crt_bundle/
2021-05-26 04:44:20 -04:00
- ./test_gen_crt_bundle.py
2019-09-29 06:04:34 -04:00
2023-04-20 10:50:11 -04:00
test_gdbstub_on_host :
extends : .host_test_template
script :
- cd components/esp_gdbstub/test_gdbstub_host
- make test
2022-08-15 23:19:17 -04:00
# Test for create virtualenv. It must be invoked from Python, not from virtualenv.
# Use docker image system python without any extra dependencies
2023-11-16 11:53:15 -05:00
test_cli_installer :
2022-08-15 23:19:17 -04:00
extends :
- .host_test_template
2023-09-26 07:24:26 -04:00
- .before_script:minimal
2021-06-05 04:59:42 -04:00
artifacts :
when : on_failure
paths :
- tools/tools.new.json
2022-08-11 08:31:02 -04:00
- tools/test_idf_tools/test_python_env_logs.txt
2022-08-15 23:19:17 -04:00
image :
name : $ESP_ENV_IMAGE
entrypoint : [ "" ] # use system python3. no extra pip package installed
2019-06-28 12:39:21 -04:00
script :
2022-08-20 04:00:54 -04:00
# Tools must be downloaded for testing
2023-09-14 01:55:24 -04:00
- python3 ${IDF_PATH}/tools/idf_tools.py download required qemu-riscv32 qemu-xtensa
2019-06-28 12:39:21 -04:00
- cd ${IDF_PATH}/tools/test_idf_tools
2022-08-15 23:19:17 -04:00
- python3 -m pip install jsonschema
2023-09-14 01:55:24 -04:00
- python3 ./test_idf_tools.py -v
2021-09-16 10:48:03 -04:00
- python3 ./test_idf_tools_python_env.py
2019-06-28 12:39:21 -04:00
2021-07-21 00:43:26 -04:00
.test_efuse_table_on_host_template :
2019-06-28 12:39:21 -04:00
extends : .host_test_template
2021-07-21 00:43:26 -04:00
variables :
IDF_TARGET : "esp32"
2019-06-28 12:39:21 -04:00
artifacts :
when : on_failure
paths :
2021-07-21 00:43:26 -04:00
- components/efuse/${IDF_TARGET}/esp_efuse_table.c
2019-06-28 12:39:21 -04:00
script :
- cd ${IDF_PATH}/components/efuse/
2021-07-21 00:43:26 -04:00
- ./efuse_table_gen.py -t "${IDF_TARGET}" ${IDF_PATH}/components/efuse/${IDF_TARGET}/esp_efuse_table.csv
2023-02-15 06:09:14 -05:00
- git diff --exit-code -- ${IDF_TARGET}/esp_efuse_table.c || { echo 'Differences found for ${IDF_TARGET} target. Please run idf.py efuse-common-table and commit the changes.'; exit 1; }
2019-06-28 12:39:21 -04:00
- cd ${IDF_PATH}/components/efuse/test_efuse_host
2021-05-26 04:44:20 -04:00
- ./efuse_tests.py
2019-06-28 12:39:21 -04:00
2021-07-21 00:43:26 -04:00
test_efuse_table_on_host_esp32 :
extends : .test_efuse_table_on_host_template
2020-06-23 22:52:51 -04:00
2021-07-21 00:43:26 -04:00
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
2023-02-15 06:09:14 -05:00
test_efuse_table_on_host_esp32h2 :
extends : .test_efuse_table_on_host_template
variables :
IDF_TARGET : esp32h2
2023-02-15 12:49:24 -05:00
test_efuse_table_on_host_esp32c6 :
extends : .test_efuse_table_on_host_template
variables :
IDF_TARGET : esp32c6
2019-06-28 12:39:21 -04:00
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
script :
- cd ${IDF_PATH}/tools/esp_app_trace/test/logtrace
2021-05-26 04:44:20 -04:00
- ./test.sh
2019-06-28 12:39:21 -04:00
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
script :
- cd ${IDF_PATH}/tools/esp_app_trace/test/sysview
2021-05-26 04:44:20 -04:00
- ./test.sh
2020-04-06 10:41:44 -04:00
2023-11-16 11:53:15 -05:00
test_tools :
2022-07-28 03:32:13 -04:00
extends :
- .host_test_template
2020-11-07 06:45:54 -05:00
artifacts :
paths :
- ${IDF_PATH}/*.out
2023-11-16 11:53:15 -05:00
- ${IDF_PATH}/XUNIT_*.xml
reports :
junit : ${IDF_PATH}/XUNIT_*.xml
variables :
LC_ALL : C.UTF-8
2023-09-18 09:52:27 -04:00
INSTALL_QEMU : 1 # for test_idf_qemu.py
2020-11-07 06:45:54 -05:00
script :
2023-11-16 11:53:15 -05:00
- stat=0
2023-11-29 04:43:19 -05:00
- cd ${IDF_PATH}/tools/ci/test_autocomplete
- pytest --noconftest test_autocomplete.py --junitxml=${IDF_PATH}/XUNIT_AUTOCOMP.xml || stat=1
2023-11-16 11:53:15 -05:00
- cd ${IDF_PATH}/tools/test_idf_py
2023-11-29 04:43:19 -05:00
- pytest --noconftest test_idf_py.py --junitxml=${IDF_PATH}/XUNIT_IDF_PY.xml || stat=1
- pytest --noconftest test_hints.py --junitxml=${IDF_PATH}/XUNIT_HINTS.xml || stat=1
2023-09-18 09:52:27 -04:00
- pytest --noconftest test_idf_qemu.py --junitxml=${IDF_PATH}/XUNIT_IDF_PY_QEMU.xml || stat=1
2023-11-16 11:53:15 -05:00
- cd ${IDF_PATH}/tools/test_mkdfu
2023-11-29 04:43:19 -05:00
- pytest --noconftest test_mkdfu.py --junitxml=${IDF_PATH}/XUNIT_MKDFU.xml || stat=1
2021-02-02 07:20:09 -05:00
- cd ${IDF_PATH}
2023-11-29 04:43:19 -05:00
- shellcheck -s sh tools/detect_python.sh || stat=1
- shellcheck -s bash tools/detect_python.sh || stat=1
- shellcheck -s dash tools/detect_python.sh || stat=1
2021-02-02 07:20:09 -05:00
- "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'"
2023-11-16 11:53:15 -05:00
- exit "$stat"
2021-03-08 02:07:44 -05:00
2021-10-06 03:43:05 -04:00
test_split_path_by_spaces :
extends : .host_test_template
script :
- cd ${IDF_PATH}/tools
- python -m unittest split_paths_by_spaces.py
2022-05-13 10:55:22 -04:00
test_mqtt_on_host :
extends : .host_test_template
script :
2022-10-17 08:59:56 -04:00
- cd ${IDF_PATH}/components/mqtt/esp-mqtt/host_test
2022-05-13 10:55:22 -04:00
- idf.py build
- LSAN_OPTIONS=verbosity=1:log_threads=1 build/host_mqtt_client_test.elf
2022-10-05 09:20:39 -04:00
test_transport_on_host :
extends : .host_test_template
script :
- cd ${IDF_PATH}/components/tcp_transport/host_test
- idf.py build
- LSAN_OPTIONS=verbosity=1:log_threads=1 build/host_tcp_transport_test.elf
2022-07-22 04:14:37 -04:00
test_sockets_on_host :
extends : .host_test_template
script :
# test the tcp-client example with system sockets
- cd ${IDF_PATH}/examples/protocols/sockets/tcp_client
- echo 'CONFIG_EXAMPLE_IPV4_ADDR="127.0.0.1"' >> sdkconfig.defaults
- idf.py --preview set-target linux
- idf.py build
- timeout 5 ./build/tcp_client.elf >test.log || true
- grep "Socket unable to connect" test.log
# test the udp-client example with lwip sockets
- cd ${IDF_PATH}/examples/protocols/sockets/udp_client
- idf.py --preview set-target linux
2023-04-03 14:31:51 -04:00
- cat sdkconfig.ci.linux > sdkconfig
2022-07-22 04:14:37 -04:00
- idf.py build
- timeout 5 ./build/udp_client.elf >test.log || true
- grep "Message sent" test.log
2021-02-07 02:03:51 -05:00
test_eh_frame_parser :
extends : .host_test_template
script :
- cd ${IDF_PATH}/components/esp_system/test_eh_frame_parser
- make
- ./eh_frame_test
2021-06-02 23:59:00 -04:00
2021-11-05 05:23:24 -04:00
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
2022-05-18 02:59:34 -04:00
test_pytest_qemu :
extends :
- .host_test_template
2023-09-26 07:24:26 -04:00
- .before_script:build
2022-07-25 08:41:51 -04:00
artifacts :
paths :
- XUNIT_RESULT.xml
- pytest_embedded_log/
reports :
junit : XUNIT_RESULT.xml
2023-07-12 23:15:38 -04:00
allow_failure : true # IDFCI-1752
2023-06-20 03:37:25 -04:00
parallel :
matrix :
- IDF_TARGET : [ esp32, esp32c3]
2023-11-28 13:16:31 -05:00
variables :
INSTALL_QEMU : 1
2022-05-18 02:59:34 -04:00
script :
2022-07-12 22:34:02 -04:00
- run_cmd python tools/ci/ci_build_apps.py . -vv
2023-06-20 03:37:25 -04:00
--target $IDF_TARGET
2022-07-12 22:34:02 -04:00
--pytest-apps
-m qemu
2023-07-11 03:32:57 -04:00
--collect-app-info "list_job_${CI_JOB_NAME_SLUG}.txt"
2023-12-18 09:29:58 -05:00
--modified-components ${MR_MODIFIED_COMPONENTS}
--modified-files ${MR_MODIFIED_FILES}
2023-12-06 01:10:41 -05:00
- python tools/ci/get_known_failure_cases_file.py
2023-07-18 22:19:44 -04:00
- run_cmd pytest
2023-06-20 03:37:25 -04:00
--target $IDF_TARGET
2022-12-23 03:24:57 -05:00
-m qemu
--embedded-services idf,qemu
--junitxml=XUNIT_RESULT.xml
2023-12-06 01:10:41 -05:00
--ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
2023-07-11 03:32:57 -04:00
--app-info-filepattern \"list_job_*.txt\"
2023-12-11 21:59:23 -05:00
--qemu-extra-args \"-global driver=timer.$IDF_TARGET.timg,property=wdt_disable,value=true\"
2023-01-04 23:28:47 -05:00
test_pytest_linux :
extends :
- .host_test_template
2023-09-26 07:24:26 -04:00
- .before_script:build
2023-01-04 23:28:47 -05:00
artifacts :
paths :
- XUNIT_RESULT.xml
- pytest_embedded_log/
2023-11-06 01:34:33 -05:00
- "**/build*/build_log.txt"
2023-01-04 23:28:47 -05:00
reports :
junit : XUNIT_RESULT.xml
script :
- run_cmd python tools/ci/ci_build_apps.py components examples tools/test_apps -vv
--target linux
--pytest-apps
-m host_test
2023-07-11 03:32:57 -04:00
--collect-app-info "list_job_${CI_JOB_NAME_SLUG}.txt"
2023-12-18 09:29:58 -05:00
--modified-components ${MR_MODIFIED_COMPONENTS}
--modified-files ${MR_MODIFIED_FILES}
2023-12-06 01:10:41 -05:00
- python tools/ci/get_known_failure_cases_file.py
2023-07-11 03:32:57 -04:00
- run_cmd pytest
--target linux
-m host_test
--junitxml=XUNIT_RESULT.xml
2023-12-06 01:10:41 -05:00
--ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
2023-07-11 03:32:57 -04:00
--app-info-filepattern \"list_job_*.txt\"
2023-12-18 09:29:58 -05:00
test_idf_pytest_plugin :
extends :
- .host_test_template
- .rules:patterns:idf-pytest-plugin
variables :
SUBMODULES_TO_FETCH : "none"
artifacts :
reports :
junit : XUNIT_RESULT.xml
script :
- cd tools/ci/idf_pytest
- pytest --junitxml=${CI_PROJECT_DIR}/XUNIT_RESULT.xml