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
dependencies : [ ]
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
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
expire_in : 1 week
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
tags :
- build
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_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
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"
expire_in : 1 week
2021-02-08 23:31:38 -05:00
.host_fuzzer_test_template :
extends :
- .host_test_template
- .rules:labels:fuzzer_test-weekend_test
2021-05-26 04:44:20 -04:00
image : $AFL_FUZZER_TEST_IMAGE
2021-02-08 23:31:38 -05:00
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
2019-06-28 12:39:21 -04:00
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
2021-04-30 12:37:15 -04:00
- cd ../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
tags :
- build
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
2019-06-28 12:39:21 -04:00
test_confserver :
extends : .host_test_template
script :
2019-12-12 10:02:36 -05:00
- cd tools/kconfig_new/test/confserver
2021-05-26 04:44:20 -04:00
- ./test_confserver.py
2019-06-28 12:39:21 -04:00
2019-12-12 10:02:36 -05:00
test_gen_kconfig_doc :
extends : .host_test_template
script :
- cd tools/kconfig_new/test/gen_kconfig_doc/
2021-05-26 04:44:20 -04:00
- ./test_target_visibility.py
- ./test_kconfig_out.py
2019-12-12 10:02:36 -05:00
2020-02-24 05:57:48 -05:00
test_confgen :
extends : .host_test_template
script :
- cd tools/kconfig_new/test/confgen/
2021-05-26 04:44:20 -04:00
- ./test_confgen.py
2020-02-24 05:57:48 -05:00
2019-06-28 12:39:21 -04:00
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 :
2022-02-17 02:27:34 -05:00
- eval $($IDF_PATH/tools/idf_tools.py export)
2019-06-28 12:39:21 -04:00
- 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
2021-05-26 04:44:20 -04:00
- ./test.sh
2019-06-28 12:39:21 -04:00
2019-08-21 08:24:14 -04:00
test_idf_py :
extends : .host_test_template
variables :
LC_ALL : C.UTF-8
script :
- cd ${IDF_PATH}/tools/test_idf_py
2021-05-26 04:44:20 -04:00
- ./test_idf_py.py
2019-08-21 08:24:14 -04:00
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
2019-06-28 12:39:21 -04:00
test_idf_tools :
2022-08-15 23:19:17 -04:00
extends :
- .host_test_template
- .before_script_minimal
2021-06-05 04:59:42 -04:00
artifacts :
when : on_failure
paths :
- tools/tools.new.json
expire_in : 1 week
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
- python3 ${IDF_PATH}/tools/idf_tools.py download
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
- python3 ./test_idf_tools.py
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
expire_in : 1 week
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
2021-08-11 09:24:17 -04:00
- 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; }
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
test_efuse_table_on_host_esp32h2 :
extends : .test_efuse_table_on_host_template
variables :
IDF_TARGET : esp32h2
2019-06-18 07:34:05 -04:00
2019-06-28 12:39:21 -04:00
test_espcoredump :
extends : .host_test_template
artifacts :
when : always
paths :
2021-07-07 03:22:17 -04:00
- components/espcoredump/test/**/.coverage
- components/espcoredump/test/**/output
2019-06-28 12:39:21 -04:00
expire_in : 1 week
2021-07-08 19:50:28 -04:00
variables :
2021-07-07 03:22:17 -04:00
IDF_COREDUMP_ELF_REPO : "https://gitlab-ci-token:${BOT_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/idf/idf-coredump-elf.git"
2022-09-28 02:59:52 -04:00
IDF_COREDUMP_ELF_TAG : idf-20220928
2021-07-08 19:50:28 -04:00
# install CMake version specified in tools.json
SETUP_TOOLS_LIST : "all"
2019-06-28 12:39:21 -04:00
script :
2022-02-17 02:27:34 -05:00
- eval $($IDF_PATH/tools/idf_tools.py export)
2021-09-08 22:45:44 -04:00
- retry_failed git clone ${IDF_COREDUMP_ELF_REPO} -b $IDF_COREDUMP_ELF_TAG
2021-07-07 03:22:17 -04:00
- cd ${IDF_PATH}/components/espcoredump/test/
- ./test_espcoredump.sh ${CI_PROJECT_DIR}/idf-coredump-elf
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
expire_in : 1 week
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
expire_in : 1 week
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
test_mkdfu :
extends : .host_test_template
variables :
LC_ALL : C.UTF-8
script :
- cd ${IDF_PATH}/tools/test_mkdfu
2021-05-26 04:44:20 -04:00
- ./test_mkdfu.py
2020-06-16 07:00:27 -04:00
2020-12-11 10:28:11 -05:00
test_mkuf2 :
extends : .host_test_template
script :
- cd ${IDF_PATH}/tools/test_mkuf2
2021-05-26 04:44:20 -04:00
- ./test_mkuf2.py
2020-12-11 10:28:11 -05:00
2020-11-12 05:52:45 -05:00
test_autocomplete :
2022-07-28 03:32:13 -04:00
extends :
- .host_test_template
2020-11-07 06:45:54 -05:00
artifacts :
when : on_failure
paths :
- ${IDF_PATH}/*.out
expire_in : 1 week
script :
2021-05-26 04:44:20 -04:00
- ${IDF_PATH}/tools/ci/test_autocomplete.py
2021-02-02 07:20:09 -05:00
test_detect_python :
2022-07-28 03:32:13 -04:00
extends :
- .host_test_template
2021-02-02 07:20:09 -05:00
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'"
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
2021-03-08 02:07:44 -05:00
test_nvs_page :
extends : .host_test_template
script :
- cd ${IDF_PATH}/components/nvs_flash/host_test/nvs_page_test
- idf.py build
2021-07-02 00:27:09 -04:00
- build/test_nvs_page_host.elf
2021-05-13 05:04:31 -04:00
2022-05-13 10:55:22 -04:00
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
2021-05-13 05:04:31 -04:00
test_log :
extends : .host_test_template
script :
- cd ${IDF_PATH}/components/log/host_test/log_test
- idf.py build
- build/test_log_host.elf
2021-02-07 02:03:51 -05:00
2021-07-21 00:07:53 -04:00
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
2021-07-26 01:29:31 -04:00
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
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
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
2021-06-11 07:20:53 -04:00
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
2021-09-09 06:49:51 -04:00
2021-10-21 22:35:46 -04:00
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
2021-01-14 00:52:36 -05:00
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
2021-09-09 06:49:51 -04:00
test_linux_example :
extends : .host_test_template
script :
- cd ${IDF_PATH}/examples/build_system/cmake/linux_host_app
- idf.py build
2021-09-22 21:27:17 -04:00
- timeout 5 ./build/linux_host_app.elf >test.log || true
- grep "Restarting" test.log
2021-11-05 05:23:24 -04:00
2022-10-14 08:15:32 -04:00
test_partition_api_host :
extends : .host_test_template
script :
- cd ${IDF_PATH}/components/esp_partition/host_test/partition_api_test
- idf.py build
- timeout 5 ./build/partition_api_test.elf >test.log
- grep " 0 Failures" test.log
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
2022-07-12 22:34:02 -04:00
- .before_script_build_jobs
2022-05-18 02:59:34 -04:00
image : $QEMU_IMAGE
script :
2022-07-12 22:34:02 -04:00
- run_cmd python tools/ci/ci_build_apps.py . -vv
--target esp32
--pytest-apps
-m qemu
2022-05-18 02:59:34 -04:00
- pytest --target esp32 -m qemu --embedded-services idf,qemu