From 05cdcfe5f4e91e4e72fc16ca3606412eadd32b7c Mon Sep 17 00:00:00 2001 From: Samuel Obuch Date: Fri, 27 Jun 2025 02:25:05 +0200 Subject: [PATCH 1/4] ci: run tests in child pipelines --- .gitlab-ci.yml | 175 +-- .gitlab/ci/build-test-app.yml | 582 ------- .../ci/downstream/build-test-app-template.yml | 179 +++ .../ci/downstream/child-pipeline-template.yml | 62 + .gitlab/ci/downstream/idf_5_1_x/build.yml | 47 + .gitlab/ci/downstream/idf_5_1_x/test.yml | 146 ++ .gitlab/ci/downstream/idf_5_2_x/build.yml | 50 + .gitlab/ci/downstream/idf_5_2_x/test.yml | 146 ++ .gitlab/ci/downstream/idf_5_3_x/build.yml | 57 + .gitlab/ci/downstream/idf_5_3_x/test.yml | 158 ++ .gitlab/ci/downstream/idf_5_4_x/build.yml | 57 + .gitlab/ci/downstream/idf_5_4_x/test.yml | 158 ++ .gitlab/ci/downstream/idf_5_5_x/build.yml | 71 + .gitlab/ci/downstream/idf_5_5_x/test.yml | 174 +++ .gitlab/ci/downstream/idf_master/build.yml | 71 + .gitlab/ci/downstream/idf_master/test.yml | 218 +++ .gitlab/ci/host-test.yml | 151 ++ .gitlab/ci/nuttx.yml | 102 ++ .gitlab/ci/run-pipeline.yml | 66 + .gitlab/ci/test-template.yml | 197 +++ .gitlab/ci/test.yml | 1348 ----------------- .gitlab/ci/util.yml | 2 +- 22 files changed, 2154 insertions(+), 2063 deletions(-) delete mode 100644 .gitlab/ci/build-test-app.yml create mode 100644 .gitlab/ci/downstream/build-test-app-template.yml create mode 100644 .gitlab/ci/downstream/child-pipeline-template.yml create mode 100644 .gitlab/ci/downstream/idf_5_1_x/build.yml create mode 100644 .gitlab/ci/downstream/idf_5_1_x/test.yml create mode 100644 .gitlab/ci/downstream/idf_5_2_x/build.yml create mode 100644 .gitlab/ci/downstream/idf_5_2_x/test.yml create mode 100644 .gitlab/ci/downstream/idf_5_3_x/build.yml create mode 100644 .gitlab/ci/downstream/idf_5_3_x/test.yml create mode 100644 .gitlab/ci/downstream/idf_5_4_x/build.yml create mode 100644 .gitlab/ci/downstream/idf_5_4_x/test.yml create mode 100644 .gitlab/ci/downstream/idf_5_5_x/build.yml create mode 100644 .gitlab/ci/downstream/idf_5_5_x/test.yml create mode 100644 .gitlab/ci/downstream/idf_master/build.yml create mode 100644 .gitlab/ci/downstream/idf_master/test.yml create mode 100644 .gitlab/ci/host-test.yml create mode 100644 .gitlab/ci/nuttx.yml create mode 100644 .gitlab/ci/run-pipeline.yml create mode 100644 .gitlab/ci/test-template.yml delete mode 100644 .gitlab/ci/test.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f600b84ee..923eb141b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,21 +1,9 @@ stages: - - fetch_gdb - pre_check - static_analyzers - build_openocd - - build_idf5.1.x - - build_idf5.2.x - - build_idf5.3.x - - build_idf5.4.x - - build_idf5.5.x - - build_idf_master + - run_test_pipelines - build_nuttx - - test_idf5.1.x - - test_idf5.2.x - - test_idf5.3.x - - test_idf5.4.x - - test_idf5.5.x - - test_idf_master - test_host - test_nuttx - coverage @@ -101,44 +89,17 @@ before_script: - set -o errexit; set -o pipefail; set -o nounset - test "${DEBUG_SHELL:-''}" = "1" && set -x -fetch_gdb: - stage: fetch_gdb +pipeline_variables: + stage: pre_check + tags: + - build variables: GIT_STRATEGY: none - rules: - - if: $TRIGGERED_BY_GDB_PIPELINE_BRANCH - needs: - - project: idf/binutils-gdb - job: pack-xtensa-arm-linux-gnueabihf - ref: $TRIGGERED_BY_GDB_PIPELINE_BRANCH - artifacts: true - - project: idf/binutils-gdb - job: pack-riscv32-arm-linux-gnueabihf - ref: $TRIGGERED_BY_GDB_PIPELINE_BRANCH - artifacts: true - - project: idf/binutils-gdb - job: pack-xtensa-aarch64-linux-gnu - ref: $TRIGGERED_BY_GDB_PIPELINE_BRANCH - artifacts: true - - project: idf/binutils-gdb - job: pack-riscv32-aarch64-linux-gnu - ref: $TRIGGERED_BY_GDB_PIPELINE_BRANCH - artifacts: true script: - - mv dist gdb - - cd gdb - - tar -xzf xtensa-esp-elf-gdb*aarch64-linux-gnu.tar.gz - - tar -xzf riscv32-esp-elf-gdb*aarch64-linux-gnu.tar.gz - - mv xtensa-esp-elf-gdb xtensa-esp-elf-gdb_arm64 - - mv riscv32-esp-elf-gdb riscv32-esp-elf-gdb_arm64 - - tar -xzf xtensa-esp-elf-gdb*arm-linux-gnueabihf.tar.gz - - tar -xzf riscv32-esp-elf-gdb*arm-linux-gnueabihf.tar.gz - - mv xtensa-esp-elf-gdb xtensa-esp-elf-gdb_armhf - - mv riscv32-esp-elf-gdb riscv32-esp-elf-gdb_armhf - - rm -f riscv32-esp-elf-gdb*.tar.gz xtensa-esp-elf-gdb*.tar.gz + - echo "TRIGGERED_BY_GDB_PIPELINE_BRANCH=${TRIGGERED_BY_GDB_PIPELINE_BRANCH:-}" >> variables.env artifacts: - paths: - - gdb + reports: + dotenv: variables.env macos_codesign: stage: pre_release @@ -229,14 +190,13 @@ test_idf_examples: include: .gitlab/ci/idf-examples.yml strategy: depend needs: - - build_linux_armhf - - build_linux_arm64 + - job: build_linux_armhf + - job: build_linux_arm64 create_coverage_reports: stage: coverage tags: - build - allow_failure: true artifacts: paths: - dist/lcov_all_report.tar.gz @@ -247,88 +207,19 @@ create_coverage_reports: coverage_report: coverage_format: cobertura path: cov_infos/cobertura.xml + junit: + - "*/results/*.xml" + when: always + expire_in: 1 week when: always expire_in: 1 week needs: - # idf 5.1.x - - job: tests_esp32_idf5.1.x - - job: tests_esp32_idf5.1.x_flash_encrypted - - job: tests_esp32s2_idf5.1.x - - job: tests_esp32s2_idf5.1.x_flash_encrypted - - job: tests_esp32s3_idf5.1.x_dual - - job: tests_esp32s3_idf5.1.x_single - - job: tests_esp32c2_idf5.1.x - - job: tests_esp32c3_idf5.1.x - - job: tests_esp32c3_idf5.1.x_flash_encrypted - - job: tests_esp32c6_idf5.1.x - - job: tests_esp32h2_idf5.1.x - # idf 5.2.x - - job: tests_esp32_idf5.2.x - - job: tests_esp32_idf5.2.x_flash_encrypted - - job: tests_esp32s2_idf5.2.x - - job: tests_esp32s2_idf5.2.x_flash_encrypted - - job: tests_esp32s3_idf5.2.x_dual - - job: tests_esp32s3_idf5.2.x_single - - job: tests_esp32c2_idf5.2.x - - job: tests_esp32c3_idf5.2.x - - job: tests_esp32c3_idf5.2.x_flash_encrypted - - job: tests_esp32c6_idf5.2.x - - job: tests_esp32h2_idf5.2.x - # idf 5.3.x - - job: tests_esp32_idf5.3.x - - job: tests_esp32_idf5.3.x_flash_encrypted - - job: tests_esp32s2_idf5.3.x - - job: tests_esp32s2_idf5.3.x_flash_encrypted - - job: tests_esp32s3_idf5.3.x_dual - - job: tests_esp32s3_idf5.3.x_single - - job: tests_esp32c2_idf5.3.x - - job: tests_esp32c3_idf5.3.x - - job: tests_esp32c3_idf5.3.x_flash_encrypted - - job: tests_esp32c6_idf5.3.x - - job: tests_esp32h2_idf5.3.x - - job: tests_esp32p4_idf5.3.x - # idf 5.4.x - - job: tests_esp32_idf5.4.x - - job: tests_esp32_idf5.4.x_flash_encrypted - - job: tests_esp32s2_idf5.4.x - - job: tests_esp32s2_idf5.4.x_flash_encrypted - - job: tests_esp32s3_idf5.4.x_dual - - job: tests_esp32s3_idf5.4.x_single - - job: tests_esp32c2_idf5.4.x - - job: tests_esp32c3_idf5.4.x - - job: tests_esp32c3_idf5.4.x_flash_encrypted - - job: tests_esp32c6_idf5.4.x - - job: tests_esp32h2_idf5.4.x - - job: tests_esp32p4_idf5.4.x - # idf 5.5.x - - job: tests_esp32_idf5.5.x - - job: tests_esp32_idf5.5.x_flash_encrypted - - job: tests_esp32s2_idf5.5.x - - job: tests_esp32s2_idf5.5.x_flash_encrypted - - job: tests_esp32s3_idf5.5.x_dual - - job: tests_esp32s3_idf5.5.x_single - - job: tests_esp32c2_idf5.5.x - - job: tests_esp32c3_idf5.5.x - - job: tests_esp32c3_idf5.5.x_flash_encrypted - - job: tests_esp32c5_idf5.5.x - - job: tests_esp32c6_idf5.5.x - - job: tests_esp32h2_idf5.5.x - - job: tests_esp32p4_idf5.5.x - # idf master - - job: tests_esp32 - - job: tests_esp32_flash_encrypted - - job: tests_esp32s2 - - job: tests_esp32s2_flash_encrypted - - job: tests_esp32s3_dual - - job: tests_esp32s3_single - - job: tests_esp32c2 - - job: tests_esp32c3 - - job: tests_esp32c3_flash_encrypted - #- job: tests_esp32c5 #disabled until esp-idf !39677 - - job: tests_esp32c6 - - job: tests_esp32c61 - - job: tests_esp32h2 - - job: tests_esp32p4 + - job: 5.1.x_run_test_pipeline + - job: 5.2.x_run_test_pipeline + - job: 5.3.x_run_test_pipeline + - job: 5.4.x_run_test_pipeline + - job: 5.5.x_run_test_pipeline + - job: master_run_test_pipeline # NuttX - job: test_nuttx_esp32 - job: test_nuttx_esp32s2 @@ -336,8 +227,26 @@ create_coverage_reports: - job: test_nuttx_esp32c3 - job: test_nuttx_esp32c6 - job: test_nuttx_esp32h2 - + when: always script: + # Fetch artifacts from downstream + - > + api_call="https://${CI_SERVER_HOST}:${CI_SERVER_PORT}/api/v4/projects/67/pipelines/${CI_PIPELINE_ID}/bridges"; + echo "${api_call}"; + BRIDGES=$(curl --header "PRIVATE-TOKEN: ${ESPCI_TOKEN}" "${api_call}"); + CHILD_IDS=$(echo "$BRIDGES" | python3 -c "import json; x=json.loads(input()); print(' '.join(str(y['downstream_pipeline']['id']) for y in x if y['name'].endswith('_run_test_pipeline')))"); + for child in $CHILD_IDS; do + api_call="https://${CI_SERVER_HOST}:${CI_SERVER_PORT}/api/v4/projects/67/pipelines/${child}/jobs"; + echo "${api_call}"; + JOBS=$(curl --header "PRIVATE-TOKEN: ${ESPCI_TOKEN}" "${api_call}"); + TEST_IDS=$(echo "$JOBS" | python3 -c "import json; x=json.loads(input()); print(' '.join(str(y['id']) for y in x if y['name'].startswith('tests_') and y['status'] != 'skipped'))"); + for test in $TEST_IDS; do + api_call="https://${CI_SERVER_HOST}:${CI_SERVER_PORT}/api/v4/projects/67/jobs/${test}/artifacts"; + echo "${api_call}"; + curl --header "PRIVATE-TOKEN: ${ESPCI_TOKEN}" "${api_call}" -o artifacts.zip; + unzip artifacts.zip || echo "No valid artifacts for ${test}"; + done; + done; - mkdir -p cov_infos - mkdir -p dist # Below lines copies all .info files into cov_infos folder @@ -382,6 +291,8 @@ update_idf_tools: include: - '.gitlab/ci/util.yml' - '.gitlab/ci/build.yml' - - '.gitlab/ci/build-test-app.yml' - - '.gitlab/ci/test.yml' + - '.gitlab/ci/test-template.yml' - '.gitlab/ci/pre-check.yml' + - '.gitlab/ci/nuttx.yml' + - '.gitlab/ci/host-test.yml' + - '.gitlab/ci/run-pipeline.yml' diff --git a/.gitlab/ci/build-test-app.yml b/.gitlab/ci/build-test-app.yml deleted file mode 100644 index df0bf47de..000000000 --- a/.gitlab/ci/build-test-app.yml +++ /dev/null @@ -1,582 +0,0 @@ -.prepare_espytrace_package: &prepare_espytrace_package | - IDF_ESPYTRACE_DIR=$IDF_PATH/tools/esp_app_trace/espytrace - if [ -d "$IDF_ESPYTRACE_DIR" ]; then - cp -rv $IDF_ESPYTRACE_DIR $BUILD_TEST_APP_DIR/ - else - cp -rv testing/esp/extra/espytrace $BUILD_TEST_APP_DIR/ - fi - -.prepare_sysview_config: &prepare_sysview_config | - SYSVIEW_CONFIG=$IDF_PATH/tools/esp_app_trace/SYSVIEW_FreeRTOS.txt - if [ -f "$SYSVIEW_CONFIG" ]; then - cp -v $SYSVIEW_CONFIG $BUILD_TEST_APP_DIR/ - else - echo "ERROR: SytemView config not found" >&2 - exit 1 - fi - -.prepare_test_app_build: &prepare_test_app_build | - mkdir -p $BUILD_TEST_APP_DIR - cp -rv testing/esp/test_apps/gen_ut_app $BUILD_TEST_APP_DIR/ - export BATCH_BUILD=1 - export V=0 - - # Check if having custom idf branch - if [ "${TEST_APP_IDF_DOCKER_IMAGE}" = "${TEST_APP_IDF_LATEST_DOCKER_IMAGE}" ]; then - if [ -n "${TEST_APP_IDF_MASTER_BRANCH:-}" ]; then - TEST_APP_CUSTOM_BRANCH="$TEST_APP_IDF_MASTER_BRANCH" - else - # Checkout from gitlab master - TEST_APP_CUSTOM_BRANCH="master" - fi - elif [ "${TEST_APP_IDF_DOCKER_IMAGE}" = "${TEST_APP_IDF5_5_RELEASE_DOCKER_IMAGE}" ] && [ -n "${TEST_APP_IDF5_5_BRANCH:-}" ]; then - TEST_APP_CUSTOM_BRANCH="$TEST_APP_IDF5_5_BRANCH" - elif [ "${TEST_APP_IDF_DOCKER_IMAGE}" = "${TEST_APP_IDF5_4_RELEASE_DOCKER_IMAGE}" ] && [ -n "${TEST_APP_IDF5_4_BRANCH:-}" ]; then - TEST_APP_CUSTOM_BRANCH="$TEST_APP_IDF5_4_BRANCH" - elif [ "${TEST_APP_IDF_DOCKER_IMAGE}" = "${TEST_APP_IDF5_3_RELEASE_DOCKER_IMAGE}" ] && [ -n "${TEST_APP_IDF5_3_BRANCH:-}" ]; then - TEST_APP_CUSTOM_BRANCH="$TEST_APP_IDF5_3_BRANCH" - elif [ "${TEST_APP_IDF_DOCKER_IMAGE}" = "${TEST_APP_IDF5_2_RELEASE_DOCKER_IMAGE}" ] && [ -n "${TEST_APP_IDF5_2_BRANCH:-}" ]; then - TEST_APP_CUSTOM_BRANCH="$TEST_APP_IDF5_2_BRANCH" - elif [ "${TEST_APP_IDF_DOCKER_IMAGE}" = "${TEST_APP_IDF5_1_RELEASE_DOCKER_IMAGE}" ] && [ -n "${TEST_APP_IDF5_1_BRANCH:-}" ]; then - TEST_APP_CUSTOM_BRANCH="$TEST_APP_IDF5_1_BRANCH" - fi - - # Use custom idf in case custom branch is present - if [ -n "${TEST_APP_CUSTOM_BRANCH:-}" ]; then - echo "TEST_APP_CUSTOM_BRANCH=$TEST_APP_CUSTOM_BRANCH" - pushd $BUILD_TEST_APP_DIR - # Clone esp-idf - git clone --shallow-submodules --recursive --single-branch --branch $TEST_APP_CUSTOM_BRANCH -- https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/espressif/esp-idf.git esp-idf - export IDF_PATH=$PWD/esp-idf - # Activate pyenv - if [ $(command -v pyenv) ]; then - source /opt/pyenv/activate - pyenv global $(pyenv versions --bare) - fi - # Install tools - ${IDF_PATH}/tools/idf_tools.py install-python-env - if [ -n "${TEST_APP_BUILD_TOOLCHAIN_PREFIX:-}" ]; then - echo "TEST_APP_BUILD_TOOLCHAIN_PREFIX=$TEST_APP_BUILD_TOOLCHAIN_PREFIX" - ${IDF_PATH}/tools/idf_tools.py install ${TEST_APP_BUILD_TOOLCHAIN_PREFIX}-elf - else - ${IDF_PATH}/tools/idf_tools.py install ${TOOLCHAIN_PREFIX}-elf - fi - # cannot exec '. ${IDF_PATH}/export.sh' here because not all tools distros are presented - # in the image and `export.sh` fails w/o adding tools to $PATH - idf_exports=$(${IDF_PATH}/tools/idf_tools.py export) || true - eval "${idf_exports}" - popd - fi - idf.py --version || true - pushd $BUILD_TEST_APP_DIR/gen_ut_app - -.finish_test_app_build: &finish_test_app_build | - export UT_APP_DIR=$PWD - mkdir -p $UT_APP_DIR/gcov_data - if [ -d "$UT_APP_DIR/builds/apptrace_gcov_dual" ]; then - pushd $UT_APP_DIR/builds/apptrace_gcov_dual - find . -type d -exec mkdir -p $UT_APP_DIR/gcov_data/apptrace_gcov_dual/\{\} \; - find . -name "*.gcno" -exec cp "{}" $UT_APP_DIR/gcov_data/apptrace_gcov_dual/esp-idf/main/CMakeFiles/__idf_main.dir \; - popd - fi - if [ -d "$UT_APP_DIR/builds/apptrace_gcov_single" ]; then - pushd $UT_APP_DIR/builds/apptrace_gcov_single - find . -type d -exec mkdir -p $UT_APP_DIR/gcov_data/apptrace_gcov_single/\{\} \; - find . -name "*.gcno" -exec cp "{}" $UT_APP_DIR/gcov_data/apptrace_gcov_single/esp-idf/main/CMakeFiles/__idf_main.dir \; - popd - fi - echo "export OPENOCD_GCOV_PREFIX=$UT_APP_DIR/gcov_data" > $UT_APP_DIR/gcov_data/gcov_env.sh - export PREFIX_STRIP=$(awk -F"/" '{print NF-1}' <<< $UT_APP_DIR/builds) - echo "export OPENOCD_GCOV_PREFIX_STRIP=$PREFIX_STRIP" >> $UT_APP_DIR/gcov_data/gcov_env.sh - popd - -.do_build_test_app: &do_build_test_app | - if [ -z "$TEST_APP_CONFIGS" ]; then - echo "Build ALL" - IDF_TARGET=${CHIP_NAME} $IDF_PATH/tools/idf.py ut-build-all-configs - else - for cfg_name in $TEST_APP_CONFIGS - do - echo "Build <${cfg_name}>" - IDF_TARGET=${CHIP_NAME} $IDF_PATH/tools/idf.py ut-apply-config-$cfg_name - IDF_TARGET=${CHIP_NAME} $IDF_PATH/tools/idf.py ut-build-$cfg_name - done - fi - -.build_test_app_template: - image: ${TEST_APP_IDF_DOCKER_IMAGE} - tags: - - build - variables: - UT_GET_IDF_VER: "1" - TEST_APP_CONFIGS: "" - artifacts: - paths: - - $BUILD_TEST_APP_DIR/gen_ut_app/output/*/gen_ut_app.elf - - $BUILD_TEST_APP_DIR/gen_ut_app/output/*/gen_ut_app.bin - - $BUILD_TEST_APP_DIR/gen_ut_app/output/*/partition_table/partition-table.bin - - $BUILD_TEST_APP_DIR/gen_ut_app/output/*/bootloader/bootloader.bin - - $BUILD_TEST_APP_DIR/gen_ut_app/output/*/flasher_args.json - - $BUILD_TEST_APP_DIR/gen_ut_app/output/*/gdbinit/symbols - # Needed to run tests - # gcc-11 - - $BUILD_TEST_APP_DIR/gen_ut_app/main/gcov_tests.c.gcda.gcov.json - - $BUILD_TEST_APP_DIR/gen_ut_app/main/helper_funcs.c.gcda.gcov.json - # gcc-12 - - $BUILD_TEST_APP_DIR/gen_ut_app/main/gcov_tests.c.gcov.json - - $BUILD_TEST_APP_DIR/gen_ut_app/main/helper_funcs.c.gcov.json - # For all gcc version - - $BUILD_TEST_APP_DIR/gen_ut_app/gcov_data/apptrace_gcov_dual - - $BUILD_TEST_APP_DIR/gen_ut_app/gcov_data/apptrace_gcov_single - - $BUILD_TEST_APP_DIR/gen_ut_app/gcov_data/gcov_env.sh - - $BUILD_TEST_APP_DIR/espytrace - - $BUILD_TEST_APP_DIR/SYSVIEW_FreeRTOS.txt - expire_in: 2 weeks - script: - - *prepare_test_app_build - - *do_build_test_app - - *finish_test_app_build - - *prepare_espytrace_package - - *prepare_sysview_config - needs: [] - -.build_idf51x_test_app_template: - stage: build_idf5.1.x - variables: - TEST_APP_IDF_DOCKER_IMAGE: "${TEST_APP_IDF5_1_RELEASE_DOCKER_IMAGE}" - BUILD_TEST_APP_DIR: "build_test_app_${CHIP_NAME}_idf5.1.x" - extends: .build_test_app_template - -.build_idf52x_test_app_template: - stage: build_idf5.2.x - variables: - TEST_APP_IDF_DOCKER_IMAGE: "${TEST_APP_IDF5_2_RELEASE_DOCKER_IMAGE}" - BUILD_TEST_APP_DIR: "build_test_app_${CHIP_NAME}_idf5.2.x" - extends: .build_test_app_template - -.build_idf53x_test_app_template: - stage: build_idf5.3.x - variables: - TEST_APP_IDF_DOCKER_IMAGE: "${TEST_APP_IDF5_3_RELEASE_DOCKER_IMAGE}" - BUILD_TEST_APP_DIR: "build_test_app_${CHIP_NAME}_idf5.3.x" - extends: .build_test_app_template - -.build_idf54x_test_app_template: - stage: build_idf5.4.x - variables: - TEST_APP_IDF_DOCKER_IMAGE: "${TEST_APP_IDF5_4_RELEASE_DOCKER_IMAGE}" - BUILD_TEST_APP_DIR: "build_test_app_${CHIP_NAME}_idf5.4.x" - extends: .build_test_app_template - -.build_idf55x_test_app_template: - stage: build_idf5.5.x - variables: - TEST_APP_IDF_DOCKER_IMAGE: "${TEST_APP_IDF5_5_RELEASE_DOCKER_IMAGE}" - BUILD_TEST_APP_DIR: "build_test_app_${CHIP_NAME}_idf5.5.x" - extends: .build_test_app_template - -.build_idf_master_test_app_template: - stage: build_idf_master - variables: - TEST_APP_IDF_DOCKER_IMAGE: "${TEST_APP_IDF_LATEST_DOCKER_IMAGE}" - BUILD_TEST_APP_DIR: "build_test_app_${CHIP_NAME}" - UT_GET_IDF_VER: "0" - extends: .build_test_app_template - -############## -# IDF master # -############## - -build_test_app_esp32: - variables: - CHIP_NAME: "esp32" - TOOLCHAIN_PREFIX: "xtensa-esp32" - TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp - extends: .build_idf_master_test_app_template - -build_test_app_esp32s2: - variables: - CHIP_NAME: "esp32s2" - TOOLCHAIN_PREFIX: "xtensa-esp32s2" - TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos single_core_freertos_list_integrity" - TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp - extends: .build_idf_master_test_app_template - -build_test_app_esp32s3: - variables: - CHIP_NAME: "esp32s3" - TOOLCHAIN_PREFIX: "xtensa-esp32s3" - TEST_APP_CONFIGS: "default svtrace_dual apptrace_gcov_dual psram_dual default_amazon_freertos default_freertos_list_integrity single_core svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos single_core_freertos_list_integrity" - TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp - extends: .build_idf_master_test_app_template - -build_test_app_esp32c2: - variables: - CHIP_NAME: "esp32c2" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos single_core_freertos_list_integrity" - extends: .build_idf_master_test_app_template - -build_test_app_esp32c3: - variables: - CHIP_NAME: "esp32c3" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single single_core_amazon_freertos single_core_freertos_list_integrity" - extends: .build_idf_master_test_app_template - -build_test_app_esp32c5: - variables: - CHIP_NAME: "esp32c5" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos single_core_freertos_list_integrity" - extends: .build_idf_master_test_app_template - -build_test_app_esp32c6: - variables: - CHIP_NAME: "esp32c6" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos single_core_preloaded_stub single_core_freertos_list_integrity" - extends: .build_idf_master_test_app_template - -build_test_app_esp32c61: - variables: - CHIP_NAME: "esp32c61" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos single_core_freertos_list_integrity" - extends: .build_idf_master_test_app_template - -build_test_app_esp32h2: - variables: - CHIP_NAME: "esp32h2" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos single_core_preloaded_stub single_core_freertos_list_integrity" - extends: .build_idf_master_test_app_template - -build_test_app_esp32p4: - variables: - CHIP_NAME: "esp32p4" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "default svtrace_dual apptrace_gcov_dual psram_dual default_amazon_freertos default_freertos_list_integrity" - extends: .build_idf_master_test_app_template - -############## -# IDF 5.5.X # -############## - -build_test_app_esp32_idf5.5.x: - variables: - CHIP_NAME: "esp32" - TOOLCHAIN_PREFIX: "xtensa-esp32" - TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp - extends: .build_idf55x_test_app_template - -build_test_app_esp32s2_idf5.5.x: - variables: - CHIP_NAME: "esp32s2" - TOOLCHAIN_PREFIX: "xtensa-esp32s2" - TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos single_core_freertos_list_integrity" - TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp - extends: .build_idf55x_test_app_template - -build_test_app_esp32s3_idf5.5.x: - variables: - CHIP_NAME: "esp32s3" - TOOLCHAIN_PREFIX: "xtensa-esp32s3" - TEST_APP_CONFIGS: "default svtrace_dual apptrace_gcov_dual psram_dual default_amazon_freertos default_freertos_list_integrity single_core svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos single_core_freertos_list_integrity" - TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp - extends: .build_idf55x_test_app_template - -build_test_app_esp32c2_idf5.5.x: - variables: - CHIP_NAME: "esp32c2" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos single_core_freertos_list_integrity" - extends: .build_idf55x_test_app_template - -build_test_app_esp32c3_idf5.5.x: - variables: - CHIP_NAME: "esp32c3" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single single_core_amazon_freertos single_core_freertos_list_integrity" - extends: .build_idf55x_test_app_template - -build_test_app_esp32c5_idf5.5.x: - variables: - CHIP_NAME: "esp32c5" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos single_core_freertos_list_integrity" - extends: .build_idf55x_test_app_template - -build_test_app_esp32c6_idf5.5.x: - variables: - CHIP_NAME: "esp32c6" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos single_core_preloaded_stub single_core_freertos_list_integrity" - extends: .build_idf55x_test_app_template - -build_test_app_esp32c61_idf5.5.x: - variables: - CHIP_NAME: "esp32c61" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos single_core_freertos_list_integrity" - extends: .build_idf55x_test_app_template - -build_test_app_esp32h2_idf5.5.x: - variables: - CHIP_NAME: "esp32h2" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos single_core_preloaded_stub single_core_freertos_list_integrity" - extends: .build_idf55x_test_app_template - -build_test_app_esp32p4_idf5.5.x: - variables: - CHIP_NAME: "esp32p4" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "default svtrace_dual apptrace_gcov_dual psram_dual default_amazon_freertos default_freertos_list_integrity" - extends: .build_idf55x_test_app_template - -############## -# IDF 5.4.X # -############## - -build_test_app_esp32_idf5.4.x: - variables: - CHIP_NAME: "esp32" - TOOLCHAIN_PREFIX: "xtensa-esp32" - TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp - extends: .build_idf54x_test_app_template - -build_test_app_esp32s2_idf5.4.x: - variables: - CHIP_NAME: "esp32s2" - TOOLCHAIN_PREFIX: "xtensa-esp32s2" - TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos" - TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp - extends: .build_idf54x_test_app_template - -build_test_app_esp32s3_idf5.4.x: - variables: - CHIP_NAME: "esp32s3" - TOOLCHAIN_PREFIX: "xtensa-esp32s3" - TEST_APP_CONFIGS: "default svtrace_dual apptrace_gcov_dual psram_dual default_amazon_freertos single_core svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos" - TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp - extends: .build_idf54x_test_app_template - -build_test_app_esp32c2_idf5.4.x: - variables: - CHIP_NAME: "esp32c2" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos" - extends: .build_idf54x_test_app_template - -build_test_app_esp32c3_idf5.4.x: - variables: - CHIP_NAME: "esp32c3" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single single_core_amazon_freertos" - extends: .build_idf54x_test_app_template - -build_test_app_esp32c6_idf5.4.x: - variables: - CHIP_NAME: "esp32c6" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos single_core_preloaded_stub" - extends: .build_idf54x_test_app_template - -build_test_app_esp32h2_idf5.4.x: - variables: - CHIP_NAME: "esp32h2" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos single_core_preloaded_stub" - extends: .build_idf54x_test_app_template - -build_test_app_esp32p4_idf5.4.x: - variables: - CHIP_NAME: "esp32p4" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "default svtrace_dual apptrace_gcov_dual psram_dual default_amazon_freertos" - extends: .build_idf54x_test_app_template - -############## -# IDF 5.3.X # -############## - -build_test_app_esp32_idf5.3.x: - variables: - CHIP_NAME: "esp32" - TOOLCHAIN_PREFIX: "xtensa-esp32" - TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp - extends: .build_idf53x_test_app_template - -build_test_app_esp32s2_idf5.3.x: - variables: - CHIP_NAME: "esp32s2" - TOOLCHAIN_PREFIX: "xtensa-esp32s2" - TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos" - TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp - extends: .build_idf53x_test_app_template - -build_test_app_esp32s3_idf5.3.x: - variables: - CHIP_NAME: "esp32s3" - TOOLCHAIN_PREFIX: "xtensa-esp32s3" - TEST_APP_CONFIGS: "default svtrace_dual apptrace_gcov_dual psram_dual default_amazon_freertos single_core svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos" - TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp - extends: .build_idf53x_test_app_template - -build_test_app_esp32c2_idf5.3.x: - variables: - CHIP_NAME: "esp32c2" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos" - extends: .build_idf53x_test_app_template - -build_test_app_esp32c3_idf5.3.x: - variables: - CHIP_NAME: "esp32c3" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single single_core_amazon_freertos" - extends: .build_idf53x_test_app_template - -build_test_app_esp32c6_idf5.3.x: - variables: - CHIP_NAME: "esp32c6" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos" - extends: .build_idf53x_test_app_template - -build_test_app_esp32h2_idf5.3.x: - variables: - CHIP_NAME: "esp32h2" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos" - extends: .build_idf53x_test_app_template - -build_test_app_esp32p4_idf5.3.x: - variables: - CHIP_NAME: "esp32p4" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "default svtrace_dual apptrace_gcov_dual psram_dual default_amazon_freertos" - extends: .build_idf53x_test_app_template - -############## -# IDF 5.2.X # -############## - -build_test_app_esp32_idf5.2.x: - variables: - CHIP_NAME: "esp32" - TOOLCHAIN_PREFIX: "xtensa-esp32" - TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp - extends: .build_idf52x_test_app_template - -build_test_app_esp32s2_idf5.2.x: - variables: - CHIP_NAME: "esp32s2" - TOOLCHAIN_PREFIX: "xtensa-esp32s2" - TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp - TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single psram_single" - extends: .build_idf52x_test_app_template - -build_test_app_esp32s3_idf5.2.x: - variables: - CHIP_NAME: "esp32s3" - TOOLCHAIN_PREFIX: "xtensa-esp32s3" - TEST_APP_CONFIGS: "default svtrace_dual apptrace_gcov_dual psram_dual single_core svtrace_single apptrace_gcov_single psram_single" - TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp - extends: .build_idf52x_test_app_template - -build_test_app_esp32c2_idf5.2.x: - variables: - CHIP_NAME: "esp32c2" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single" - extends: .build_idf52x_test_app_template - -build_test_app_esp32c3_idf5.2.x: - variables: - CHIP_NAME: "esp32c3" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single" - extends: .build_idf52x_test_app_template - -build_test_app_esp32c6_idf5.2.x: - variables: - CHIP_NAME: "esp32c6" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single" - extends: .build_idf52x_test_app_template - -build_test_app_esp32h2_idf5.2.x: - variables: - CHIP_NAME: "esp32h2" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single" - extends: .build_idf52x_test_app_template - -############# -# IDF 5.1.X # -############# - -build_test_app_esp32_idf5.1.x: - variables: - CHIP_NAME: "esp32" - TOOLCHAIN_PREFIX: "xtensa-esp32" - extends: .build_idf51x_test_app_template - -build_test_app_esp32s2_idf5.1.x: - variables: - CHIP_NAME: "esp32s2" - TOOLCHAIN_PREFIX: "xtensa-esp32s2" - TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single psram_single" - extends: .build_idf51x_test_app_template - -build_test_app_esp32s3_idf5.1.x: - variables: - CHIP_NAME: "esp32s3" - TOOLCHAIN_PREFIX: "xtensa-esp32s3" - TEST_APP_CONFIGS: "default svtrace_dual apptrace_gcov_dual psram_dual single_core svtrace_single apptrace_gcov_single psram_single" - extends: .build_idf51x_test_app_template - -build_test_app_esp32c2_idf5.1.x: - variables: - CHIP_NAME: "esp32c2" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single" - extends: .build_idf51x_test_app_template - -build_test_app_esp32c3_idf5.1.x: - variables: - CHIP_NAME: "esp32c3" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single" - extends: .build_idf51x_test_app_template - -build_test_app_esp32c6_idf5.1.x: - variables: - CHIP_NAME: "esp32c6" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single" - extends: .build_idf51x_test_app_template - -build_test_app_esp32h2_idf5.1.x: - variables: - CHIP_NAME: "esp32h2" - TOOLCHAIN_PREFIX: "riscv32-esp" - TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single" - extends: .build_idf51x_test_app_template - -######## -# Misc # -######## - -build_nuttx_app: - stage: build_nuttx - trigger: - project: idf/apache/esp-nuttx-apps - strategy: depend - allow_failure: true - needs: [] - parallel: - matrix: - - TRIGGER_JOB: [openocd-esp32, openocd-esp32s2, openocd-esp32s3, openocd-esp32c3, openocd-esp32c6, openocd-esp32h2] diff --git a/.gitlab/ci/downstream/build-test-app-template.yml b/.gitlab/ci/downstream/build-test-app-template.yml new file mode 100644 index 000000000..0443dd901 --- /dev/null +++ b/.gitlab/ci/downstream/build-test-app-template.yml @@ -0,0 +1,179 @@ +.prepare_espytrace_package: &prepare_espytrace_package | + IDF_ESPYTRACE_DIR=$IDF_PATH/tools/esp_app_trace/espytrace + if [ -d "$IDF_ESPYTRACE_DIR" ]; then + cp -rv $IDF_ESPYTRACE_DIR $BUILD_TEST_APP_DIR/ + else + cp -rv testing/esp/extra/espytrace $BUILD_TEST_APP_DIR/ + fi + +.prepare_sysview_config: &prepare_sysview_config | + SYSVIEW_CONFIG=$IDF_PATH/tools/esp_app_trace/SYSVIEW_FreeRTOS.txt + if [ -f "$SYSVIEW_CONFIG" ]; then + cp -v $SYSVIEW_CONFIG $BUILD_TEST_APP_DIR/ + else + echo "ERROR: SytemView config not found" >&2 + exit 1 + fi + +.prepare_test_app_build: &prepare_test_app_build | + mkdir -p $BUILD_TEST_APP_DIR + cp -rv testing/esp/test_apps/gen_ut_app $BUILD_TEST_APP_DIR/ + export BATCH_BUILD=1 + export V=0 + + # Check if having custom idf branch + if [ "${TEST_APP_IDF_DOCKER_IMAGE}" = "${TEST_APP_IDF_LATEST_DOCKER_IMAGE}" ]; then + if [ -n "${TEST_APP_IDF_MASTER_BRANCH:-}" ]; then + TEST_APP_CUSTOM_BRANCH="$TEST_APP_IDF_MASTER_BRANCH" + else + # Checkout from gitlab master + TEST_APP_CUSTOM_BRANCH="master" + fi + elif [ "${TEST_APP_IDF_DOCKER_IMAGE}" = "${TEST_APP_IDF5_5_RELEASE_DOCKER_IMAGE}" ] && [ -n "${TEST_APP_IDF5_5_BRANCH:-}" ]; then + TEST_APP_CUSTOM_BRANCH="$TEST_APP_IDF5_5_BRANCH" + elif [ "${TEST_APP_IDF_DOCKER_IMAGE}" = "${TEST_APP_IDF5_4_RELEASE_DOCKER_IMAGE}" ] && [ -n "${TEST_APP_IDF5_4_BRANCH:-}" ]; then + TEST_APP_CUSTOM_BRANCH="$TEST_APP_IDF5_4_BRANCH" + elif [ "${TEST_APP_IDF_DOCKER_IMAGE}" = "${TEST_APP_IDF5_3_RELEASE_DOCKER_IMAGE}" ] && [ -n "${TEST_APP_IDF5_3_BRANCH:-}" ]; then + TEST_APP_CUSTOM_BRANCH="$TEST_APP_IDF5_3_BRANCH" + elif [ "${TEST_APP_IDF_DOCKER_IMAGE}" = "${TEST_APP_IDF5_2_RELEASE_DOCKER_IMAGE}" ] && [ -n "${TEST_APP_IDF5_2_BRANCH:-}" ]; then + TEST_APP_CUSTOM_BRANCH="$TEST_APP_IDF5_2_BRANCH" + elif [ "${TEST_APP_IDF_DOCKER_IMAGE}" = "${TEST_APP_IDF5_1_RELEASE_DOCKER_IMAGE}" ] && [ -n "${TEST_APP_IDF5_1_BRANCH:-}" ]; then + TEST_APP_CUSTOM_BRANCH="$TEST_APP_IDF5_1_BRANCH" + fi + + # Use custom idf in case custom branch is present + if [ -n "${TEST_APP_CUSTOM_BRANCH:-}" ]; then + echo "TEST_APP_CUSTOM_BRANCH=$TEST_APP_CUSTOM_BRANCH" + pushd $BUILD_TEST_APP_DIR + # Clone esp-idf + git clone --shallow-submodules --recursive --single-branch --branch $TEST_APP_CUSTOM_BRANCH -- https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/espressif/esp-idf.git esp-idf + export IDF_PATH=$PWD/esp-idf + # Activate pyenv + if [ $(command -v pyenv) ]; then + source /opt/pyenv/activate + pyenv global $(pyenv versions --bare) + fi + # Install tools + ${IDF_PATH}/tools/idf_tools.py install-python-env + if [ -n "${TEST_APP_BUILD_TOOLCHAIN_PREFIX:-}" ]; then + echo "TEST_APP_BUILD_TOOLCHAIN_PREFIX=$TEST_APP_BUILD_TOOLCHAIN_PREFIX" + ${IDF_PATH}/tools/idf_tools.py install ${TEST_APP_BUILD_TOOLCHAIN_PREFIX}-elf + else + ${IDF_PATH}/tools/idf_tools.py install ${TOOLCHAIN_PREFIX}-elf + fi + # cannot exec '. ${IDF_PATH}/export.sh' here because not all tools distros are presented + # in the image and `export.sh` fails w/o adding tools to $PATH + idf_exports=$(${IDF_PATH}/tools/idf_tools.py export) || true + eval "${idf_exports}" + popd + fi + idf.py --version || true + pushd $BUILD_TEST_APP_DIR/gen_ut_app + +.finish_test_app_build: &finish_test_app_build | + export UT_APP_DIR=$PWD + mkdir -p $UT_APP_DIR/gcov_data + if [ -d "$UT_APP_DIR/builds/apptrace_gcov_dual" ]; then + pushd $UT_APP_DIR/builds/apptrace_gcov_dual + find . -type d -exec mkdir -p $UT_APP_DIR/gcov_data/apptrace_gcov_dual/\{\} \; + find . -name "*.gcno" -exec cp "{}" $UT_APP_DIR/gcov_data/apptrace_gcov_dual/esp-idf/main/CMakeFiles/__idf_main.dir \; + popd + fi + if [ -d "$UT_APP_DIR/builds/apptrace_gcov_single" ]; then + pushd $UT_APP_DIR/builds/apptrace_gcov_single + find . -type d -exec mkdir -p $UT_APP_DIR/gcov_data/apptrace_gcov_single/\{\} \; + find . -name "*.gcno" -exec cp "{}" $UT_APP_DIR/gcov_data/apptrace_gcov_single/esp-idf/main/CMakeFiles/__idf_main.dir \; + popd + fi + echo "export OPENOCD_GCOV_PREFIX=$UT_APP_DIR/gcov_data" > $UT_APP_DIR/gcov_data/gcov_env.sh + export PREFIX_STRIP=$(awk -F"/" '{print NF-1}' <<< $UT_APP_DIR/builds) + echo "export OPENOCD_GCOV_PREFIX_STRIP=$PREFIX_STRIP" >> $UT_APP_DIR/gcov_data/gcov_env.sh + popd + +.do_build_test_app: &do_build_test_app | + if [ -z "$TEST_APP_CONFIGS" ]; then + echo "Build ALL" + IDF_TARGET=${CHIP_NAME} $IDF_PATH/tools/idf.py ut-build-all-configs + else + for cfg_name in $TEST_APP_CONFIGS + do + echo "Build <${cfg_name}>" + IDF_TARGET=${CHIP_NAME} $IDF_PATH/tools/idf.py ut-apply-config-$cfg_name + IDF_TARGET=${CHIP_NAME} $IDF_PATH/tools/idf.py ut-build-$cfg_name + done + fi + +.build_test_app_template: + image: ${TEST_APP_IDF_DOCKER_IMAGE} + tags: + - build + stage: build + variables: + UT_GET_IDF_VER: "1" + TEST_APP_CONFIGS: "" + artifacts: + paths: + - $BUILD_TEST_APP_DIR/gen_ut_app/output/*/gen_ut_app.elf + - $BUILD_TEST_APP_DIR/gen_ut_app/output/*/gen_ut_app.bin + - $BUILD_TEST_APP_DIR/gen_ut_app/output/*/partition_table/partition-table.bin + - $BUILD_TEST_APP_DIR/gen_ut_app/output/*/bootloader/bootloader.bin + - $BUILD_TEST_APP_DIR/gen_ut_app/output/*/flasher_args.json + - $BUILD_TEST_APP_DIR/gen_ut_app/output/*/gdbinit/symbols + # Needed to run tests + # gcc-11 + - $BUILD_TEST_APP_DIR/gen_ut_app/main/gcov_tests.c.gcda.gcov.json + - $BUILD_TEST_APP_DIR/gen_ut_app/main/helper_funcs.c.gcda.gcov.json + # gcc-12 + - $BUILD_TEST_APP_DIR/gen_ut_app/main/gcov_tests.c.gcov.json + - $BUILD_TEST_APP_DIR/gen_ut_app/main/helper_funcs.c.gcov.json + # For all gcc version + - $BUILD_TEST_APP_DIR/gen_ut_app/gcov_data/apptrace_gcov_dual + - $BUILD_TEST_APP_DIR/gen_ut_app/gcov_data/apptrace_gcov_single + - $BUILD_TEST_APP_DIR/gen_ut_app/gcov_data/gcov_env.sh + - $BUILD_TEST_APP_DIR/espytrace + - $BUILD_TEST_APP_DIR/SYSVIEW_FreeRTOS.txt + expire_in: 2 weeks + script: + - *prepare_test_app_build + - *do_build_test_app + - *finish_test_app_build + - *prepare_espytrace_package + - *prepare_sysview_config + needs: [] + +.build_idf51x_test_app_template: + variables: + TEST_APP_IDF_DOCKER_IMAGE: "${TEST_APP_IDF5_1_RELEASE_DOCKER_IMAGE}" + BUILD_TEST_APP_DIR: "build_test_app_${CHIP_NAME}_idf5.1.x" + extends: .build_test_app_template + +.build_idf52x_test_app_template: + variables: + TEST_APP_IDF_DOCKER_IMAGE: "${TEST_APP_IDF5_2_RELEASE_DOCKER_IMAGE}" + BUILD_TEST_APP_DIR: "build_test_app_${CHIP_NAME}_idf5.2.x" + extends: .build_test_app_template + +.build_idf53x_test_app_template: + variables: + TEST_APP_IDF_DOCKER_IMAGE: "${TEST_APP_IDF5_3_RELEASE_DOCKER_IMAGE}" + BUILD_TEST_APP_DIR: "build_test_app_${CHIP_NAME}_idf5.3.x" + extends: .build_test_app_template + +.build_idf54x_test_app_template: + variables: + TEST_APP_IDF_DOCKER_IMAGE: "${TEST_APP_IDF5_4_RELEASE_DOCKER_IMAGE}" + BUILD_TEST_APP_DIR: "build_test_app_${CHIP_NAME}_idf5.4.x" + extends: .build_test_app_template + +.build_idf55x_test_app_template: + variables: + TEST_APP_IDF_DOCKER_IMAGE: "${TEST_APP_IDF5_5_RELEASE_DOCKER_IMAGE}" + BUILD_TEST_APP_DIR: "build_test_app_${CHIP_NAME}_idf5.5.x" + extends: .build_test_app_template + +.build_idf_master_test_app_template: + variables: + TEST_APP_IDF_DOCKER_IMAGE: "${TEST_APP_IDF_LATEST_DOCKER_IMAGE}" + BUILD_TEST_APP_DIR: "build_test_app_${CHIP_NAME}" + UT_GET_IDF_VER: "0" + extends: .build_test_app_template diff --git a/.gitlab/ci/downstream/child-pipeline-template.yml b/.gitlab/ci/downstream/child-pipeline-template.yml new file mode 100644 index 000000000..f07580646 --- /dev/null +++ b/.gitlab/ci/downstream/child-pipeline-template.yml @@ -0,0 +1,62 @@ +stages: + - fetch_gdb + - build + - test + - results + +image: $CI_DOCKER_REGISTRY/openocd-ci-env:1 + +default: + interruptible: true + retry: + max: 2 + when: runner_system_failure + exit_codes: 75 + +variables: + DIST_ART_DIR: "dist" + DIST_INSTALLED_DIR: "${CI_PROJECT_NAME}" + +fetch_gdb: + stage: fetch_gdb + variables: + GIT_STRATEGY: none + needs: + - project: idf/binutils-gdb + job: pack-xtensa-arm-linux-gnueabihf + ref: $TRIGGERED_BY_GDB_PIPELINE_BRANCH + artifacts: true + - project: idf/binutils-gdb + job: pack-riscv32-arm-linux-gnueabihf + ref: $TRIGGERED_BY_GDB_PIPELINE_BRANCH + artifacts: true + - project: idf/binutils-gdb + job: pack-xtensa-aarch64-linux-gnu + ref: $TRIGGERED_BY_GDB_PIPELINE_BRANCH + artifacts: true + - project: idf/binutils-gdb + job: pack-riscv32-aarch64-linux-gnu + ref: $TRIGGERED_BY_GDB_PIPELINE_BRANCH + artifacts: true + rules: + - if: '$TRIGGERED_BY_GDB_PIPELINE_BRANCH != "" && $IDF_MASTER_RUN == "1"' + script: + - mv dist gdb + - cd gdb + - tar -xzf xtensa-esp-elf-gdb*aarch64-linux-gnu.tar.gz + - tar -xzf riscv32-esp-elf-gdb*aarch64-linux-gnu.tar.gz + - mv xtensa-esp-elf-gdb xtensa-esp-elf-gdb_arm64 + - mv riscv32-esp-elf-gdb riscv32-esp-elf-gdb_arm64 + - tar -xzf xtensa-esp-elf-gdb*arm-linux-gnueabihf.tar.gz + - tar -xzf riscv32-esp-elf-gdb*arm-linux-gnueabihf.tar.gz + - mv xtensa-esp-elf-gdb xtensa-esp-elf-gdb_armhf + - mv riscv32-esp-elf-gdb riscv32-esp-elf-gdb_armhf + - rm -f riscv32-esp-elf-gdb*.tar.gz xtensa-esp-elf-gdb*.tar.gz + artifacts: + paths: + - gdb + +include: + - '.gitlab/ci/downstream/build-test-app-template.yml' + - '.gitlab/ci/util.yml' + - '.gitlab/ci/test-template.yml' diff --git a/.gitlab/ci/downstream/idf_5_1_x/build.yml b/.gitlab/ci/downstream/idf_5_1_x/build.yml new file mode 100644 index 000000000..dd65c19ec --- /dev/null +++ b/.gitlab/ci/downstream/idf_5_1_x/build.yml @@ -0,0 +1,47 @@ +build_test_app_esp32_idf5.1.x: + variables: + CHIP_NAME: "esp32" + TOOLCHAIN_PREFIX: "xtensa-esp32" + extends: .build_idf51x_test_app_template + +build_test_app_esp32s2_idf5.1.x: + variables: + CHIP_NAME: "esp32s2" + TOOLCHAIN_PREFIX: "xtensa-esp32s2" + TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single psram_single" + extends: .build_idf51x_test_app_template + +build_test_app_esp32s3_idf5.1.x: + variables: + CHIP_NAME: "esp32s3" + TOOLCHAIN_PREFIX: "xtensa-esp32s3" + TEST_APP_CONFIGS: "default svtrace_dual apptrace_gcov_dual psram_dual single_core svtrace_single apptrace_gcov_single psram_single" + extends: .build_idf51x_test_app_template + +build_test_app_esp32c2_idf5.1.x: + variables: + CHIP_NAME: "esp32c2" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single" + extends: .build_idf51x_test_app_template + +build_test_app_esp32c3_idf5.1.x: + variables: + CHIP_NAME: "esp32c3" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single" + extends: .build_idf51x_test_app_template + +build_test_app_esp32c6_idf5.1.x: + variables: + CHIP_NAME: "esp32c6" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single" + extends: .build_idf51x_test_app_template + +build_test_app_esp32h2_idf5.1.x: + variables: + CHIP_NAME: "esp32h2" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single" + extends: .build_idf51x_test_app_template diff --git a/.gitlab/ci/downstream/idf_5_1_x/test.yml b/.gitlab/ci/downstream/idf_5_1_x/test.yml new file mode 100644 index 000000000..468be9d37 --- /dev/null +++ b/.gitlab/ci/downstream/idf_5_1_x/test.yml @@ -0,0 +1,146 @@ +tests_esp32_idf5.1.x: + extends: .tests_v5.1.x_template + needs: + - job: build_test_app_esp32_idf5.1.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32" + TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -e *.*Encrypted" + +tests_esp32_idf5.1.x_flash_encrypted: + extends: .tests_v5.1.x_template + tags: + - test_jtag_arm_flash_encryption + needs: + - job: build_test_app_esp32_idf5.1.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32" + TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -p test_*.*Encrypted" + +tests_esp32s2_idf5.1.x: + extends: .tests_v5.1.x_template + needs: + - job: build_test_app_esp32s2_idf5.1.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32s2" + TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*Single" + +tests_esp32s2_idf5.1.x_flash_encrypted: + extends: .tests_v5.1.x_template + tags: + - test_jtag_arm_flash_encryption_esp32s2 + needs: + - job: build_test_app_esp32s2_idf5.1.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32s2" + TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*SingleEncrypted" + +tests_esp32s3_idf5.1.x_dual: + extends: .tests_v5.1.x_template + needs: + - job: build_test_app_esp32s3_idf5.1.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32s3" + TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Dual" + +tests_esp32s3_idf5.1.x_single: + extends: .tests_v5.1.x_template + needs: + - job: build_test_app_esp32s3_idf5.1.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32s3" + OOCD_CMDS: "set ESP_ONLYCPU 1" + TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Single" + +tests_esp32c2_idf5.1.x: + extends: .tests_v5.1.x_riscv_template + needs: + - job: build_test_app_esp32c2_idf5.1.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32c2" + TEST_RUN_BOARD_OPTS: "-b esp32c2-ftdi -p test_*.*Single4MB test_*.*Single" + +tests_esp32c3_idf5.1.x: + extends: .tests_v5.1.x_riscv_template + needs: + - job: build_test_app_esp32c3_idf5.1.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32c3" + TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*Single" + +tests_esp32c3_idf5.1.x_flash_encrypted: + extends: .tests_v5.1.x_riscv_template + tags: + - test_jtag_arm_flash_encryption_esp32c3 + needs: + - job: build_test_app_esp32c3_idf5.1.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32c3" + TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*SingleEncrypted" + +tests_esp32c6_idf5.1.x: + extends: .tests_v5.1.x_riscv_template + tags: + - esp32c6 + - usb_serial_jtag + needs: + - job: build_test_app_esp32c6_idf5.1.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32c6" + ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" + TEST_RUN_BOARD_OPTS: "-b esp32c6-builtin -p test_*.*Single4MB test_*.*Single" + +tests_esp32h2_idf5.1.x: + extends: .tests_v5.1.x_riscv_template + tags: + - esp32h2 + - usb_serial_jtag + needs: + - job: build_test_app_esp32h2_idf5.1.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32h2" + ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" + TEST_RUN_BOARD_OPTS: "-b esp32h2-builtin -p test_*.*Single4MB test_*.*Single" diff --git a/.gitlab/ci/downstream/idf_5_2_x/build.yml b/.gitlab/ci/downstream/idf_5_2_x/build.yml new file mode 100644 index 000000000..9aa26b440 --- /dev/null +++ b/.gitlab/ci/downstream/idf_5_2_x/build.yml @@ -0,0 +1,50 @@ +build_test_app_esp32_idf5.2.x: + variables: + CHIP_NAME: "esp32" + TOOLCHAIN_PREFIX: "xtensa-esp32" + TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp + extends: .build_idf52x_test_app_template + +build_test_app_esp32s2_idf5.2.x: + variables: + CHIP_NAME: "esp32s2" + TOOLCHAIN_PREFIX: "xtensa-esp32s2" + TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp + TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single psram_single" + extends: .build_idf52x_test_app_template + +build_test_app_esp32s3_idf5.2.x: + variables: + CHIP_NAME: "esp32s3" + TOOLCHAIN_PREFIX: "xtensa-esp32s3" + TEST_APP_CONFIGS: "default svtrace_dual apptrace_gcov_dual psram_dual single_core svtrace_single apptrace_gcov_single psram_single" + TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp + extends: .build_idf52x_test_app_template + +build_test_app_esp32c2_idf5.2.x: + variables: + CHIP_NAME: "esp32c2" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single" + extends: .build_idf52x_test_app_template + +build_test_app_esp32c3_idf5.2.x: + variables: + CHIP_NAME: "esp32c3" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single" + extends: .build_idf52x_test_app_template + +build_test_app_esp32c6_idf5.2.x: + variables: + CHIP_NAME: "esp32c6" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single" + extends: .build_idf52x_test_app_template + +build_test_app_esp32h2_idf5.2.x: + variables: + CHIP_NAME: "esp32h2" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single" + extends: .build_idf52x_test_app_template diff --git a/.gitlab/ci/downstream/idf_5_2_x/test.yml b/.gitlab/ci/downstream/idf_5_2_x/test.yml new file mode 100644 index 000000000..88021e412 --- /dev/null +++ b/.gitlab/ci/downstream/idf_5_2_x/test.yml @@ -0,0 +1,146 @@ +tests_esp32_idf5.2.x: + extends: .tests_v5.2.x_template + needs: + - job: build_test_app_esp32_idf5.2.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32" + TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -e *.*Encrypted" + +tests_esp32_idf5.2.x_flash_encrypted: + extends: .tests_v5.2.x_template + tags: + - test_jtag_arm_flash_encryption + needs: + - job: build_test_app_esp32_idf5.2.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32" + TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -p test_*.*Encrypted" + +tests_esp32s2_idf5.2.x: + extends: .tests_v5.2.x_template + needs: + - job: build_test_app_esp32s2_idf5.2.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32s2" + TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*Single" + +tests_esp32s2_idf5.2.x_flash_encrypted: + extends: .tests_v5.2.x_template + tags: + - test_jtag_arm_flash_encryption_esp32s2 + needs: + - job: build_test_app_esp32s2_idf5.2.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32s2" + TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*SingleEncrypted" + +tests_esp32s3_idf5.2.x_dual: + extends: .tests_v5.2.x_template + needs: + - job: build_test_app_esp32s3_idf5.2.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32s3" + TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Dual" + +tests_esp32s3_idf5.2.x_single: + extends: .tests_v5.2.x_template + needs: + - job: build_test_app_esp32s3_idf5.2.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32s3" + OOCD_CMDS: "set ESP_ONLYCPU 1" + TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Single" + +tests_esp32c2_idf5.2.x: + extends: .tests_v5.2.x_riscv_template + needs: + - job: build_test_app_esp32c2_idf5.2.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32c2" + TEST_RUN_BOARD_OPTS: "-b esp32c2-ftdi -p test_*.*Single4MB test_*.*Single" + +tests_esp32c3_idf5.2.x: + extends: .tests_v5.2.x_riscv_template + needs: + - job: build_test_app_esp32c3_idf5.2.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32c3" + TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*Single" + +tests_esp32c3_idf5.2.x_flash_encrypted: + extends: .tests_v5.2.x_riscv_template + tags: + - test_jtag_arm_flash_encryption_esp32c3 + needs: + - job: build_test_app_esp32c3_idf5.2.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32c3" + TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*SingleEncrypted" + +tests_esp32c6_idf5.2.x: + extends: .tests_v5.2.x_riscv_template + tags: + - esp32c6 + - usb_serial_jtag + needs: + - job: build_test_app_esp32c6_idf5.2.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32c6" + ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" + TEST_RUN_BOARD_OPTS: "-b esp32c6-builtin -p test_*.*Single4MB test_*.*Single" + +tests_esp32h2_idf5.2.x: + extends: .tests_v5.2.x_riscv_template + tags: + - esp32h2 + - usb_serial_jtag + needs: + - job: build_test_app_esp32h2_idf5.2.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32h2" + ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" + TEST_RUN_BOARD_OPTS: "-b esp32h2-builtin -p test_*.*Single4MB test_*.*Single" diff --git a/.gitlab/ci/downstream/idf_5_3_x/build.yml b/.gitlab/ci/downstream/idf_5_3_x/build.yml new file mode 100644 index 000000000..e52bf248c --- /dev/null +++ b/.gitlab/ci/downstream/idf_5_3_x/build.yml @@ -0,0 +1,57 @@ +build_test_app_esp32_idf5.3.x: + variables: + CHIP_NAME: "esp32" + TOOLCHAIN_PREFIX: "xtensa-esp32" + TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp + extends: .build_idf53x_test_app_template + +build_test_app_esp32s2_idf5.3.x: + variables: + CHIP_NAME: "esp32s2" + TOOLCHAIN_PREFIX: "xtensa-esp32s2" + TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos" + TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp + extends: .build_idf53x_test_app_template + +build_test_app_esp32s3_idf5.3.x: + variables: + CHIP_NAME: "esp32s3" + TOOLCHAIN_PREFIX: "xtensa-esp32s3" + TEST_APP_CONFIGS: "default svtrace_dual apptrace_gcov_dual psram_dual default_amazon_freertos single_core svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos" + TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp + extends: .build_idf53x_test_app_template + +build_test_app_esp32c2_idf5.3.x: + variables: + CHIP_NAME: "esp32c2" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos" + extends: .build_idf53x_test_app_template + +build_test_app_esp32c3_idf5.3.x: + variables: + CHIP_NAME: "esp32c3" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single single_core_amazon_freertos" + extends: .build_idf53x_test_app_template + +build_test_app_esp32c6_idf5.3.x: + variables: + CHIP_NAME: "esp32c6" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos" + extends: .build_idf53x_test_app_template + +build_test_app_esp32h2_idf5.3.x: + variables: + CHIP_NAME: "esp32h2" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos" + extends: .build_idf53x_test_app_template + +build_test_app_esp32p4_idf5.3.x: + variables: + CHIP_NAME: "esp32p4" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "default svtrace_dual apptrace_gcov_dual psram_dual default_amazon_freertos" + extends: .build_idf53x_test_app_template diff --git a/.gitlab/ci/downstream/idf_5_3_x/test.yml b/.gitlab/ci/downstream/idf_5_3_x/test.yml new file mode 100644 index 000000000..7ad0432af --- /dev/null +++ b/.gitlab/ci/downstream/idf_5_3_x/test.yml @@ -0,0 +1,158 @@ +tests_esp32_idf5.3.x: + extends: .tests_v5.3.x_template + needs: + - job: build_test_app_esp32_idf5.3.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32" + TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -e *.*Encrypted" + +tests_esp32_idf5.3.x_flash_encrypted: + extends: .tests_v5.3.x_template + tags: + - test_jtag_arm_flash_encryption + needs: + - job: build_test_app_esp32_idf5.3.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32" + TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -p test_*.*Encrypted" + +tests_esp32s2_idf5.3.x: + extends: .tests_v5.3.x_template + needs: + - job: build_test_app_esp32s2_idf5.3.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32s2" + TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*Single" + +tests_esp32s2_idf5.3.x_flash_encrypted: + extends: .tests_v5.3.x_template + tags: + - test_jtag_arm_flash_encryption_esp32s2 + needs: + - job: build_test_app_esp32s2_idf5.3.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32s2" + TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*SingleEncrypted" + +tests_esp32s3_idf5.3.x_dual: + extends: .tests_v5.3.x_template + needs: + - job: build_test_app_esp32s3_idf5.3.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32s3" + TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Dual" + +tests_esp32s3_idf5.3.x_single: + extends: .tests_v5.3.x_template + needs: + - job: build_test_app_esp32s3_idf5.3.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32s3" + OOCD_CMDS: "set ESP_ONLYCPU 1" + TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Single" + +tests_esp32c2_idf5.3.x: + extends: .tests_v5.3.x_riscv_template + needs: + - job: build_test_app_esp32c2_idf5.3.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32c2" + TEST_RUN_BOARD_OPTS: "-b esp32c2-ftdi -p test_*.*Single4MB test_*.*Single" + +tests_esp32c3_idf5.3.x: + extends: .tests_v5.3.x_riscv_template + needs: + - job: build_test_app_esp32c3_idf5.3.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32c3" + TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*Single" + +tests_esp32c3_idf5.3.x_flash_encrypted: + extends: .tests_v5.3.x_riscv_template + tags: + - test_jtag_arm_flash_encryption_esp32c3 + needs: + - job: build_test_app_esp32c3_idf5.3.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32c3" + TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*SingleEncrypted" + +tests_esp32c6_idf5.3.x: + extends: .tests_v5.3.x_riscv_template + tags: + - esp32c6 + - usb_serial_jtag + needs: + - job: build_test_app_esp32c6_idf5.3.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32c6" + ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" + TEST_RUN_BOARD_OPTS: "-b esp32c6-builtin -p test_*.*Single4MB test_*.*Single" + +tests_esp32h2_idf5.3.x: + extends: .tests_v5.3.x_riscv_template + tags: + - esp32h2 + - usb_serial_jtag + needs: + - job: build_test_app_esp32h2_idf5.3.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32h2" + ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" + TEST_RUN_BOARD_OPTS: "-b esp32h2-builtin -p test_*.*Single4MB test_*.*Single" + +tests_esp32p4_idf5.3.x: + extends: .tests_v5.3.x_riscv_template + needs: + - job: build_test_app_esp32p4_idf5.3.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32p4" + TEST_RUN_BOARD_OPTS: "-b esp32p4-ftdi -p test_*.*Dual" diff --git a/.gitlab/ci/downstream/idf_5_4_x/build.yml b/.gitlab/ci/downstream/idf_5_4_x/build.yml new file mode 100644 index 000000000..5b3187441 --- /dev/null +++ b/.gitlab/ci/downstream/idf_5_4_x/build.yml @@ -0,0 +1,57 @@ +build_test_app_esp32_idf5.4.x: + variables: + CHIP_NAME: "esp32" + TOOLCHAIN_PREFIX: "xtensa-esp32" + TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp + extends: .build_idf54x_test_app_template + +build_test_app_esp32s2_idf5.4.x: + variables: + CHIP_NAME: "esp32s2" + TOOLCHAIN_PREFIX: "xtensa-esp32s2" + TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos" + TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp + extends: .build_idf54x_test_app_template + +build_test_app_esp32s3_idf5.4.x: + variables: + CHIP_NAME: "esp32s3" + TOOLCHAIN_PREFIX: "xtensa-esp32s3" + TEST_APP_CONFIGS: "default svtrace_dual apptrace_gcov_dual psram_dual default_amazon_freertos single_core svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos" + TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp + extends: .build_idf54x_test_app_template + +build_test_app_esp32c2_idf5.4.x: + variables: + CHIP_NAME: "esp32c2" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos" + extends: .build_idf54x_test_app_template + +build_test_app_esp32c3_idf5.4.x: + variables: + CHIP_NAME: "esp32c3" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single single_core_amazon_freertos" + extends: .build_idf54x_test_app_template + +build_test_app_esp32c6_idf5.4.x: + variables: + CHIP_NAME: "esp32c6" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos single_core_preloaded_stub" + extends: .build_idf54x_test_app_template + +build_test_app_esp32h2_idf5.4.x: + variables: + CHIP_NAME: "esp32h2" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos single_core_preloaded_stub" + extends: .build_idf54x_test_app_template + +build_test_app_esp32p4_idf5.4.x: + variables: + CHIP_NAME: "esp32p4" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "default svtrace_dual apptrace_gcov_dual psram_dual default_amazon_freertos" + extends: .build_idf54x_test_app_template diff --git a/.gitlab/ci/downstream/idf_5_4_x/test.yml b/.gitlab/ci/downstream/idf_5_4_x/test.yml new file mode 100644 index 000000000..4fc6ef31f --- /dev/null +++ b/.gitlab/ci/downstream/idf_5_4_x/test.yml @@ -0,0 +1,158 @@ +tests_esp32_idf5.4.x: + extends: .tests_v5.4.x_template + needs: + - job: build_test_app_esp32_idf5.4.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32" + TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -e *.*Encrypted" + +tests_esp32_idf5.4.x_flash_encrypted: + extends: .tests_v5.4.x_template + tags: + - test_jtag_arm_flash_encryption + needs: + - job: build_test_app_esp32_idf5.4.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32" + TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -p test_*.*Encrypted" + +tests_esp32s2_idf5.4.x: + extends: .tests_v5.4.x_template + needs: + - job: build_test_app_esp32s2_idf5.4.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32s2" + TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*Single" + +tests_esp32s2_idf5.4.x_flash_encrypted: + extends: .tests_v5.4.x_template + tags: + - test_jtag_arm_flash_encryption_esp32s2 + needs: + - job: build_test_app_esp32s2_idf5.4.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32s2" + TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*SingleEncrypted" + +tests_esp32s3_idf5.4.x_dual: + extends: .tests_v5.4.x_template + needs: + - job: build_test_app_esp32s3_idf5.4.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32s3" + TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Dual" + +tests_esp32s3_idf5.4.x_single: + extends: .tests_v5.4.x_template + needs: + - job: build_test_app_esp32s3_idf5.4.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32s3" + OOCD_CMDS: "set ESP_ONLYCPU 1" + TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Single" + +tests_esp32c2_idf5.4.x: + extends: .tests_v5.4.x_riscv_template + needs: + - job: build_test_app_esp32c2_idf5.4.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32c2" + TEST_RUN_BOARD_OPTS: "-b esp32c2-ftdi -p test_*.*Single4MB test_*.*Single" + +tests_esp32c3_idf5.4.x: + extends: .tests_v5.4.x_riscv_template + needs: + - job: build_test_app_esp32c3_idf5.4.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32c3" + TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*Single" + +tests_esp32c3_idf5.4.x_flash_encrypted: + extends: .tests_v5.4.x_riscv_template + tags: + - test_jtag_arm_flash_encryption_esp32c3 + needs: + - job: build_test_app_esp32c3_idf5.4.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32c3" + TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*SingleEncrypted" + +tests_esp32c6_idf5.4.x: + extends: .tests_v5.4.x_riscv_template + tags: + - esp32c6 + - usb_serial_jtag + needs: + - job: build_test_app_esp32c6_idf5.4.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32c6" + ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" + TEST_RUN_BOARD_OPTS: "-b esp32c6-builtin -p test_*.*Single4MB test_*.*Single" + +tests_esp32h2_idf5.4.x: + extends: .tests_v5.4.x_riscv_template + tags: + - esp32h2 + - usb_serial_jtag + needs: + - job: build_test_app_esp32h2_idf5.4.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32h2" + ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" + TEST_RUN_BOARD_OPTS: "-b esp32h2-builtin -p test_*.*Single4MB test_*.*Single" + +tests_esp32p4_idf5.4.x: + extends: .tests_v5.4.x_riscv_template + needs: + - job: build_test_app_esp32p4_idf5.4.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32p4" + TEST_RUN_BOARD_OPTS: "-b esp32p4-ftdi -p test_*.*Dual" diff --git a/.gitlab/ci/downstream/idf_5_5_x/build.yml b/.gitlab/ci/downstream/idf_5_5_x/build.yml new file mode 100644 index 000000000..a6cb35147 --- /dev/null +++ b/.gitlab/ci/downstream/idf_5_5_x/build.yml @@ -0,0 +1,71 @@ +build_test_app_esp32_idf5.5.x: + variables: + CHIP_NAME: "esp32" + TOOLCHAIN_PREFIX: "xtensa-esp32" + TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp + extends: .build_idf55x_test_app_template + +build_test_app_esp32s2_idf5.5.x: + variables: + CHIP_NAME: "esp32s2" + TOOLCHAIN_PREFIX: "xtensa-esp32s2" + TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos single_core_freertos_list_integrity" + TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp + extends: .build_idf55x_test_app_template + +build_test_app_esp32s3_idf5.5.x: + variables: + CHIP_NAME: "esp32s3" + TOOLCHAIN_PREFIX: "xtensa-esp32s3" + TEST_APP_CONFIGS: "default svtrace_dual apptrace_gcov_dual psram_dual default_amazon_freertos default_freertos_list_integrity single_core svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos single_core_freertos_list_integrity" + TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp + extends: .build_idf55x_test_app_template + +build_test_app_esp32c2_idf5.5.x: + variables: + CHIP_NAME: "esp32c2" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos single_core_freertos_list_integrity" + extends: .build_idf55x_test_app_template + +build_test_app_esp32c3_idf5.5.x: + variables: + CHIP_NAME: "esp32c3" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single single_core_amazon_freertos single_core_freertos_list_integrity" + extends: .build_idf55x_test_app_template + +build_test_app_esp32c5_idf5.5.x: + variables: + CHIP_NAME: "esp32c5" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos single_core_freertos_list_integrity" + extends: .build_idf55x_test_app_template + +build_test_app_esp32c6_idf5.5.x: + variables: + CHIP_NAME: "esp32c6" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos single_core_preloaded_stub single_core_freertos_list_integrity" + extends: .build_idf55x_test_app_template + +build_test_app_esp32c61_idf5.5.x: + variables: + CHIP_NAME: "esp32c61" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos single_core_freertos_list_integrity" + extends: .build_idf55x_test_app_template + +build_test_app_esp32h2_idf5.5.x: + variables: + CHIP_NAME: "esp32h2" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos single_core_preloaded_stub single_core_freertos_list_integrity" + extends: .build_idf55x_test_app_template + +build_test_app_esp32p4_idf5.5.x: + variables: + CHIP_NAME: "esp32p4" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "default svtrace_dual apptrace_gcov_dual psram_dual default_amazon_freertos default_freertos_list_integrity" + extends: .build_idf55x_test_app_template diff --git a/.gitlab/ci/downstream/idf_5_5_x/test.yml b/.gitlab/ci/downstream/idf_5_5_x/test.yml new file mode 100644 index 000000000..44a94fd25 --- /dev/null +++ b/.gitlab/ci/downstream/idf_5_5_x/test.yml @@ -0,0 +1,174 @@ +tests_esp32_idf5.5.x: + extends: .tests_v5.5.x_template + needs: + - job: build_test_app_esp32_idf5.5.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32" + TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -e *.*Encrypted" + +tests_esp32_idf5.5.x_flash_encrypted: + extends: .tests_v5.5.x_template + tags: + - test_jtag_arm_flash_encryption + needs: + - job: build_test_app_esp32_idf5.5.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32" + TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -p test_*.*Encrypted" + +tests_esp32s2_idf5.5.x: + extends: .tests_v5.5.x_template + needs: + - job: build_test_app_esp32s2_idf5.5.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32s2" + TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*Single" + +tests_esp32s2_idf5.5.x_flash_encrypted: + extends: .tests_v5.5.x_template + tags: + - test_jtag_arm_flash_encryption_esp32s2 + needs: + - job: build_test_app_esp32s2_idf5.5.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32s2" + TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*SingleEncrypted" + +tests_esp32s3_idf5.5.x_dual: + extends: .tests_v5.5.x_template + needs: + - job: build_test_app_esp32s3_idf5.5.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32s3" + TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Dual" + +tests_esp32s3_idf5.5.x_single: + extends: .tests_v5.5.x_template + needs: + - job: build_test_app_esp32s3_idf5.5.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32s3" + OOCD_CMDS: "set ESP_ONLYCPU 1" + TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Single" + +tests_esp32c2_idf5.5.x: + extends: .tests_v5.5.x_riscv_template + needs: + - job: build_test_app_esp32c2_idf5.5.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32c2" + TEST_RUN_BOARD_OPTS: "-b esp32c2-ftdi -p test_*.*Single4MB test_*.*Single" + +tests_esp32c3_idf5.5.x: + extends: .tests_v5.5.x_riscv_template + needs: + - job: build_test_app_esp32c3_idf5.5.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32c3" + TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*Single" + +tests_esp32c3_idf5.5.x_flash_encrypted: + extends: .tests_v5.5.x_riscv_template + tags: + - test_jtag_arm_flash_encryption_esp32c3 + needs: + - job: build_test_app_esp32c3_idf5.5.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32c3" + TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*SingleEncrypted" + +tests_esp32c5_idf5.5.x: + extends: .tests_v5.5.x_riscv_template + tags: + - esp32c5 + - usb_serial_jtag + needs: + - job: build_test_app_esp32c5_idf5.5.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32c5" + ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" + TEST_RUN_BOARD_OPTS: "-b esp32c5-builtin -p test_*.*Single" + +tests_esp32c6_idf5.5.x: + extends: .tests_v5.5.x_riscv_template + tags: + - esp32c6 + - usb_serial_jtag + needs: + - job: build_test_app_esp32c6_idf5.5.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32c6" + ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" + TEST_RUN_BOARD_OPTS: "-b esp32c6-builtin -p test_*.*Single4MB test_*.*Single" + +tests_esp32h2_idf5.5.x: + extends: .tests_v5.5.x_riscv_template + tags: + - esp32h2 + - usb_serial_jtag + needs: + - job: build_test_app_esp32h2_idf5.5.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32h2" + ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" + TEST_RUN_BOARD_OPTS: "-b esp32h2-builtin -p test_*.*Single4MB test_*.*Single" + +tests_esp32p4_idf5.5.x: + extends: .tests_v5.5.x_riscv_template + needs: + - job: build_test_app_esp32p4_idf5.5.x + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + variables: + CHIP_NAME: "esp32p4" + TEST_RUN_BOARD_OPTS: "-b esp32p4-ftdi -p test_*.*Dual" diff --git a/.gitlab/ci/downstream/idf_master/build.yml b/.gitlab/ci/downstream/idf_master/build.yml new file mode 100644 index 000000000..f8830869c --- /dev/null +++ b/.gitlab/ci/downstream/idf_master/build.yml @@ -0,0 +1,71 @@ +build_test_app_esp32: + variables: + CHIP_NAME: "esp32" + TOOLCHAIN_PREFIX: "xtensa-esp32" + TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp + extends: .build_idf_master_test_app_template + +build_test_app_esp32s2: + variables: + CHIP_NAME: "esp32s2" + TOOLCHAIN_PREFIX: "xtensa-esp32s2" + TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos single_core_freertos_list_integrity" + TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp + extends: .build_idf_master_test_app_template + +build_test_app_esp32s3: + variables: + CHIP_NAME: "esp32s3" + TOOLCHAIN_PREFIX: "xtensa-esp32s3" + TEST_APP_CONFIGS: "default svtrace_dual apptrace_gcov_dual psram_dual default_amazon_freertos default_freertos_list_integrity single_core svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos single_core_freertos_list_integrity" + TEST_APP_BUILD_TOOLCHAIN_PREFIX: xtensa-esp + extends: .build_idf_master_test_app_template + +build_test_app_esp32c2: + variables: + CHIP_NAME: "esp32c2" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos single_core_freertos_list_integrity" + extends: .build_idf_master_test_app_template + +build_test_app_esp32c3: + variables: + CHIP_NAME: "esp32c3" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_encrypted svtrace_single apptrace_gcov_single single_core_amazon_freertos single_core_freertos_list_integrity" + extends: .build_idf_master_test_app_template + +build_test_app_esp32c5: + variables: + CHIP_NAME: "esp32c5" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos single_core_freertos_list_integrity" + extends: .build_idf_master_test_app_template + +build_test_app_esp32c6: + variables: + CHIP_NAME: "esp32c6" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos single_core_preloaded_stub single_core_freertos_list_integrity" + extends: .build_idf_master_test_app_template + +build_test_app_esp32c61: + variables: + CHIP_NAME: "esp32c61" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core svtrace_single apptrace_gcov_single psram_single single_core_amazon_freertos single_core_freertos_list_integrity" + extends: .build_idf_master_test_app_template + +build_test_app_esp32h2: + variables: + CHIP_NAME: "esp32h2" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "single_core single_core_4MB svtrace_single apptrace_gcov_single single_core_amazon_freertos single_core_preloaded_stub single_core_freertos_list_integrity" + extends: .build_idf_master_test_app_template + +build_test_app_esp32p4: + variables: + CHIP_NAME: "esp32p4" + TOOLCHAIN_PREFIX: "riscv32-esp" + TEST_APP_CONFIGS: "default svtrace_dual apptrace_gcov_dual psram_dual default_amazon_freertos default_freertos_list_integrity" + extends: .build_idf_master_test_app_template diff --git a/.gitlab/ci/downstream/idf_master/test.yml b/.gitlab/ci/downstream/idf_master/test.yml new file mode 100644 index 000000000..6bbab63fe --- /dev/null +++ b/.gitlab/ci/downstream/idf_master/test.yml @@ -0,0 +1,218 @@ +tests_esp32: + extends: .tests_master_template + needs: + - job: build_test_app_esp32 + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + - job: fetch_gdb + optional: true + variables: + CHIP_NAME: "esp32" + TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -e *.*Encrypted" + +tests_esp32_flash_encrypted: + extends: .tests_master_template + tags: + - test_jtag_arm_flash_encryption + needs: + - job: build_test_app_esp32 + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + - job: fetch_gdb + optional: true + variables: + CHIP_NAME: "esp32" + TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -p test_*.*Encrypted" + +tests_esp32s2: + extends: .tests_master_template + needs: + - job: build_test_app_esp32s2 + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + - job: fetch_gdb + optional: true + variables: + CHIP_NAME: "esp32s2" + TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*Single" + +tests_esp32s2_flash_encrypted: + extends: .tests_master_template + tags: + - test_jtag_arm_flash_encryption_esp32s2 + needs: + - job: build_test_app_esp32s2 + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + - job: fetch_gdb + optional: true + variables: + CHIP_NAME: "esp32s2" + TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*SingleEncrypted" + +tests_esp32s3_dual: + extends: .tests_master_template + needs: + - job: build_test_app_esp32s3 + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + - job: fetch_gdb + optional: true + variables: + CHIP_NAME: "esp32s3" + TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Dual" + +tests_esp32s3_single: + extends: .tests_master_template + needs: + - job: build_test_app_esp32s3 + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + - job: fetch_gdb + optional: true + variables: + CHIP_NAME: "esp32s3" + OOCD_CMDS: "set ESP_ONLYCPU 1" + TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Single" + +tests_esp32c2: + extends: .tests_master_riscv_template + needs: + - job: build_test_app_esp32c2 + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + - job: fetch_gdb + optional: true + variables: + CHIP_NAME: "esp32c2" + TEST_RUN_BOARD_OPTS: "-b esp32c2-ftdi -p test_*.*Single4MB test_*.*Single" + +tests_esp32c3: + extends: .tests_master_riscv_template + needs: + - job: build_test_app_esp32c3 + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + - job: fetch_gdb + optional: true + variables: + CHIP_NAME: "esp32c3" + TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*Single" + +tests_esp32c3_flash_encrypted: + extends: .tests_master_riscv_template + tags: + - test_jtag_arm_flash_encryption_esp32c3 + needs: + - job: build_test_app_esp32c3 + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + - job: fetch_gdb + optional: true + variables: + CHIP_NAME: "esp32c3" + TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*SingleEncrypted" + +.tests_esp32c5: + extends: .tests_master_riscv_template + tags: + - esp32c5 + - usb_serial_jtag + needs: + - job: build_test_app_esp32c5 + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + - job: fetch_gdb + optional: true + variables: + CHIP_NAME: "esp32c5" + ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" + TEST_RUN_BOARD_OPTS: "-b esp32c5-builtin -p test_*.*Single" + +tests_esp32c6: + extends: .tests_master_riscv_template + tags: + - esp32c6 + - usb_serial_jtag + needs: + - job: build_test_app_esp32c6 + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + - job: fetch_gdb + optional: true + variables: + CHIP_NAME: "esp32c6" + ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" + TEST_RUN_BOARD_OPTS: "-b esp32c6-builtin -p test_*.*Single4MB test_*.*Single" + +tests_esp32c61: + extends: .tests_master_riscv_template + tags: + - esp32c61 + - usb_serial_jtag + needs: + - job: build_test_app_esp32c61 + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + - job: fetch_gdb + optional: true + variables: + CHIP_NAME: "esp32c61" + ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" + TEST_RUN_BOARD_OPTS: "-b esp32c61-builtin -p test_*.*Single" + +tests_esp32h2: + extends: .tests_master_riscv_template + tags: + - esp32h2 + - usb_serial_jtag + needs: + - job: build_test_app_esp32h2 + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + - job: fetch_gdb + optional: true + variables: + CHIP_NAME: "esp32h2" + ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" + TEST_RUN_BOARD_OPTS: "-b esp32h2-builtin -p test_*.*Single4MB test_*.*Single" + +tests_esp32p4: + extends: .tests_master_riscv_template + needs: + - job: build_test_app_esp32p4 + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_arm64_test + - pipeline: $PARENT_PIPELINE_ID + job: build_linux_armhf_test + - job: fetch_gdb + optional: true + variables: + CHIP_NAME: "esp32p4" + TEST_RUN_BOARD_OPTS: "-b esp32p4-ftdi -p test_*.*Dual" diff --git a/.gitlab/ci/host-test.yml b/.gitlab/ci/host-test.yml new file mode 100644 index 000000000..0f2ea45df --- /dev/null +++ b/.gitlab/ci/host-test.yml @@ -0,0 +1,151 @@ +############# +# HOST TEST # +############# + +.run_openocd_unix: &run_openocd_unix | + ARCHIVE_NAME=$(cat "$DIST_ART_DIR/dist_name_$PLATFORM_NAME") + echo $ARCHIVE_NAME + tar xzf $DIST_ART_DIR/$ARCHIVE_NAME openocd-esp32 + python tools/test_openocd.py openocd-esp32/bin/openocd + +test_on_windows: + stage: test_host + tags: + - test_jtag_win + needs: + - job: build_windows_win32 + variables: + # actually we don't need the project sources, but we need the `git clean` gitlab-runner's stage. + # It's possible only for `fetch` or `clone`. + GIT_STRATEGY: fetch + PLATFORM_NAME: "win32" + before_script: [] + script: + - $ARCHIVE_NAME=$(cat "$DIST_ART_DIR/dist_name_$PLATFORM_NAME") + - Expand-Archive -DestinationPath . "$DIST_ART_DIR/$ARCHIVE_NAME" + - python tools/test_openocd.py openocd-esp32\bin\openocd + +test_on_macos: + stage: test_host + tags: + - darwin + - amd64 + needs: + - job: build_macos + variables: + # actually we don't need the project sources, but we need the `git clean` gitlab-runner's stage. + # It's possible only for `fetch` or `clone`. + GIT_STRATEGY: fetch + PLATFORM_NAME: "macos" + before_script: [] + script: + - *run_openocd_unix + +tests_on_macos_arm64: + stage: test_host + tags: + - darwin + - aarch64 + needs: + - job: build_macos_arm64 + variables: + # actually we don't need the project sources, but we need the `git clean` gitlab-runner's stage. + # It's possible only for `fetch` or `clone`. + GIT_STRATEGY: fetch + PLATFORM_NAME: "macos-arm64" + before_script: [] + script: + - *run_openocd_unix + +tests_on_linux: + stage: test_host + image: $CI_DOCKER_REGISTRY/esp-env-v5.1:1 + tags: + - build + needs: + - job: build_linux + variables: + # actually we don't need the project sources, but we need the `git clean` gitlab-runner's stage. + # It's possible only for `fetch` or `clone`. + GIT_STRATEGY: fetch + PLATFORM_NAME: "linux-amd64" + before_script: [] + script: + - *run_openocd_unix + +#################### +# Board Detector # +#################### + +.test_board_detector_template: + stage: test_host + image: $CI_DOCKER_REGISTRY/target-test-env-v5.5:2 + tags: + - $CHIP_NAME + - $JTAG_IFACE + needs: + - job: build_linux_arm64 + - job: build_linux_armhf + variables: + GIT_STRATEGY: fetch + artifacts: + paths: + - artifacts/esp-config.json + when: always + expire_in: 1 day + before_script: + - > + machine="$(uname -m)"; + if [[ "$machine" == "armv7l" ]] ; then + export PLATFORM_NAME="linux-armhf"; + elif [[ "$machine" == "aarch64" ]] ; then + export PLATFORM_NAME="linux-arm64"; + fi; + echo "PLATFORM_NAME: ${PLATFORM_NAME}"; + script: + - OUTPUT_DIR=$PWD/artifacts + - mkdir -p $OUTPUT_DIR + - ARCHIVE_NAME=$(cat "$DIST_ART_DIR/dist_name_$PLATFORM_NAME") + - echo $ARCHIVE_NAME + - tar xzf $DIST_ART_DIR/$ARCHIVE_NAME openocd-esp32 + - OOCD_DIR=$PWD/openocd-esp32 + - OOCD_SCRIPTS_DIR=$OOCD_DIR/share/openocd/scripts + - OOCD_TOOLS_DIR=$OOCD_DIR/share/openocd/espressif/tools + - python $OOCD_TOOLS_DIR/esp_detect_config.py -b $OOCD_DIR/bin/openocd -s $OOCD_SCRIPTS_DIR -c $OOCD_SCRIPTS_DIR/esp-config.json -o $OUTPUT_DIR/esp-config.json -d 4 + - python $PWD/testing/esp/check_esp_config.py $OUTPUT_DIR/esp-config.json -c $CHIP_NAME -i $JTAG_IFACE -d 4 + +test_board_detector_esp32_jtag: + extends: .test_board_detector_template + variables: + CHIP_NAME: "esp32" + JTAG_IFACE: "jtag" + +test_board_detector_esp32s3_jtag: + extends: .test_board_detector_template + variables: + CHIP_NAME: "esp32s3" + JTAG_IFACE: "jtag" + +test_board_detector_esp32c3_jtag: + extends: .test_board_detector_template + variables: + CHIP_NAME: "esp32c3" + JTAG_IFACE: "jtag" + +test_board_detector_esp32c5_usj: + extends: .test_board_detector_template + variables: + CHIP_NAME: "esp32c5" + JTAG_IFACE: "usb_serial_jtag" + +test_board_detector_esp32c6_usj: + extends: .test_board_detector_template + variables: + CHIP_NAME: "esp32c6" + JTAG_IFACE: "usb_serial_jtag" + +test_board_detector_esp32p4_jtag: + extends: .test_board_detector_template + variables: + CHIP_NAME: "esp32p4" + JTAG_IFACE: "jtag" diff --git a/.gitlab/ci/nuttx.yml b/.gitlab/ci/nuttx.yml new file mode 100644 index 000000000..7d867a8f5 --- /dev/null +++ b/.gitlab/ci/nuttx.yml @@ -0,0 +1,102 @@ +build_nuttx_app: + stage: build_nuttx + trigger: + project: idf/apache/esp-nuttx-apps + strategy: depend + allow_failure: true + needs: [] + parallel: + matrix: + - TRIGGER_JOB: [openocd-esp32, openocd-esp32s2, openocd-esp32s3, openocd-esp32c3, openocd-esp32c6, openocd-esp32h2] + + +# nuttx build environment is nuttx/build-env-v5.1 +.test_nuttx_template: + extends: .tests_v5.1.x_template + stage: test_nuttx + allow_failure: true + variables: + RUNNER_SCRIPT_TIMEOUT: 5m + TEST_RUN_DIR: "build_test_app_${CHIP_NAME}_nuttx_test" + NUTTX_APP_NAME: "nuttx_openocd" + OOCD_CMDS: "set ESP_RTOS nuttx,set ESP_ONLYCPU 1" + IDF_RELEASE_TAG: "other" + TEST_RUN_BOARD_OPTS: "-b ${TEST_BOARD} -p test_nuttx -e *.*Encrypted" + artifacts: + paths: + - $TEST_RUN_DIR/debug_backend_tests.log + - $TEST_RUN_DIR/esp_cov_files + - $TEST_RUN_DIR/sanitizer_errors.log + reports: + junit: + - $TEST_RUN_DIR/results/* + when: always + expire_in: 1 week + needs: + - job: build_linux_arm64_test + - job: build_linux_armhf_test + - job: build_nuttx_app + artifacts: false + - project: idf/apache/esp-nuttx-apps + job: build_openocd_${CHIP_NAME} + ref: master + script: + - !reference [.export_toolchain, script] + - mkdir -p $TEST_RUN_DIR/$NUTTX_APP_NAME + - !reference [.copy_nuttx_files, script] + - !reference [.run_tests_linux, script] + +.test_nuttx_riscv_template: + extends: .test_nuttx_template + variables: + TOOLCHAIN_PREFIX: "riscv32-esp" + ESP_GDB_TOOLCHAIN: "${ESP_V5_1X_RISCV_GDB_TOOLCHAIN}" + CHIP_TEST_TOOLCHAIN: "riscv32-esp" + +test_nuttx_esp32: + extends: + - .test_nuttx_template + variables: + CHIP_NAME: esp32 + TEST_BOARD: "esp32-wrover-kit-3.3v" + +test_nuttx_esp32s2: + extends: + - .test_nuttx_template + variables: + CHIP_NAME: esp32s2 + TEST_BOARD: "esp32s2-devkitj" + +test_nuttx_esp32s3: + extends: + - .test_nuttx_template + variables: + CHIP_NAME: esp32s3 + TEST_BOARD: "esp32s3-ftdi" + +test_nuttx_esp32c3: + extends: + - .test_nuttx_riscv_template + variables: + CHIP_NAME: esp32c3 + TEST_BOARD: "esp32c3-ftdi" + +test_nuttx_esp32c6: + extends: + - .test_nuttx_riscv_template + tags: + - esp32c6 + - usb_serial_jtag + variables: + CHIP_NAME: esp32c6 + TEST_BOARD: "esp32c6-builtin" + +test_nuttx_esp32h2: + extends: + - .test_nuttx_riscv_template + tags: + - esp32h2 + - usb_serial_jtag + variables: + CHIP_NAME: esp32h2 + TEST_BOARD: "esp32h2-builtin" \ No newline at end of file diff --git a/.gitlab/ci/run-pipeline.yml b/.gitlab/ci/run-pipeline.yml new file mode 100644 index 000000000..1c0ba4aae --- /dev/null +++ b/.gitlab/ci/run-pipeline.yml @@ -0,0 +1,66 @@ +.run_test_pipeline: + stage: run_test_pipelines + needs: + - job: build_linux_arm64_test + - job: build_linux_armhf_test + variables: + PARENT_PIPELINE_ID: $CI_PIPELINE_ID + TRIGGERED_BY_GDB_PIPELINE_BRANCH: $TRIGGERED_BY_GDB_PIPELINE_BRANCH + SCHEDULE_TYPE: $SCHEDULE_TYPE + IDF_MASTER_RUN: "0" + +5.1.x_run_test_pipeline: + extends: .run_test_pipeline + trigger: + include: + - local: '.gitlab/ci/downstream/child-pipeline-template.yml' + - local: '.gitlab/ci/downstream/idf_5_1_x/build.yml' + - local: '.gitlab/ci/downstream/idf_5_1_x/test.yml' + strategy: depend + +5.2.x_run_test_pipeline: + extends: .run_test_pipeline + trigger: + include: + - local: '.gitlab/ci/downstream/child-pipeline-template.yml' + - local: '.gitlab/ci/downstream/idf_5_2_x/build.yml' + - local: '.gitlab/ci/downstream/idf_5_2_x/test.yml' + strategy: depend + +5.3.x_run_test_pipeline: + extends: .run_test_pipeline + trigger: + include: + - local: '.gitlab/ci/downstream/child-pipeline-template.yml' + - local: '.gitlab/ci/downstream/idf_5_3_x/build.yml' + - local: '.gitlab/ci/downstream/idf_5_3_x/test.yml' + strategy: depend + +5.4.x_run_test_pipeline: + extends: .run_test_pipeline + trigger: + include: + - local: '.gitlab/ci/downstream/child-pipeline-template.yml' + - local: '.gitlab/ci/downstream/idf_5_4_x/build.yml' + - local: '.gitlab/ci/downstream/idf_5_4_x/test.yml' + strategy: depend + +5.5.x_run_test_pipeline: + extends: .run_test_pipeline + trigger: + include: + - local: '.gitlab/ci/downstream/child-pipeline-template.yml' + - local: '.gitlab/ci/downstream/idf_5_5_x/build.yml' + - local: '.gitlab/ci/downstream/idf_5_5_x/test.yml' + strategy: depend + +master_run_test_pipeline: + extends: .run_test_pipeline + variables: + IDF_MASTER_RUN: "1" + trigger: + include: + - local: '.gitlab/ci/downstream/child-pipeline-template.yml' + - local: '.gitlab/ci/downstream/idf_master/build.yml' + - local: '.gitlab/ci/downstream/idf_master/test.yml' + strategy: depend diff --git a/.gitlab/ci/test-template.yml b/.gitlab/ci/test-template.yml new file mode 100644 index 000000000..6d6e5e9ce --- /dev/null +++ b/.gitlab/ci/test-template.yml @@ -0,0 +1,197 @@ +.tests_template: + tags: + - $CHIP_NAME + - jtag + stage: test + variables: + RUNNER_SCRIPT_TIMEOUT: 60m + OOCD_CMDS: "set VAR 1" # default command to avoid missing argument error. + TEST_RUN_EXTRA_OPTS: "-r -i ${IDF_RELEASE_TAG} ${TEST_RUN_BOARD_OPTS} ${TEST_RUN_COMMON_ARGS}" + ESPTOOL_PORT: "/dev/serial_ports/ttyUSB-esp32" + artifacts: + paths: + - $TEST_RUN_DIR/debug_backend_tests.log + - $TEST_RUN_DIR/esp_cov_files + - $TEST_RUN_DIR/sanitizer_errors.log + - $TEST_RUN_DIR/results + reports: + junit: + - $TEST_RUN_DIR/results/* + when: always + expire_in: 1 week + before_script: + - export GCOV_PREFIX=$PWD/$TEST_RUN_DIR + - export GCOV_PREFIX_STRIP=2 + - pip install unittest-xml-reporting --no-deps + - pip install pygdbmi==0.9.0.2 + - ./tools/install-rom-elfs.sh + - > + machine="$(uname -m)"; + if [[ "$machine" == "armv7l" ]] ; then + export CONF_HOST="arm-linux-gnueabihf"; + export PLATFORM_NAME="linux-armhf-test"; + elif [[ "$machine" == "aarch64" ]] ; then + export CONF_HOST="aarch64-linux-gnu"; + export PLATFORM_NAME="linux-arm64-test"; + fi; + echo "PLATFORM_NAME: ${PLATFORM_NAME}"; + if [ ! -z "$ESP_GCOV_TOOLCHAIN" ] ; then + export ESP_GCOV_TOOLCHAIN="${ESP_GCOV_TOOLCHAIN}-${CONF_HOST}"; + echo "ESP_GCOV_TOOLCHAIN: ${ESP_GCOV_TOOLCHAIN}"; + fi; + if [[ $SCHEDULE_TYPE == "run_sanitizer_tests" ]] ; then + export ASAN_OPTIONS="detect_invalid_pointer_pairs=2:print_stacktrace=1:strict_string_checks=1:halt_on_error=0:allocator_may_return_null=1"; + export TEST_SANITIZERS=1; + cp ${CONF_HOST}/lib* /usr/lib; + fi + script: + - !reference [.submodules_mirror_update, script] + - !reference [.export_toolchain, script] + - . $PWD/${TEST_RUN_DIR}/gen_ut_app/gcov_data/gcov_env.sh + - !reference [.run_tests_linux, script] + after_script: + # Below lines gets esp related file paths from tools/format-esp.sh + # and change file extension as .gcno and .gcda + - > + input="tools/format-esp.sh"; + file_full_path=""; + dir_path=""; + file_name=""; + command_arg=""; + splitter_line="# Stub flasher related files"; + while IFS= read -r line ; do + if [[ ${line:0:2} == "./" ]] ; then + file_full_path=${line##*.sh }; + file_name=${file_full_path##*/} ; + dir_path=${file_full_path%$file_name} ; + command_arg+="--include "${dir_path}"*"${file_name:0:-2}".gcno "; + command_arg+="--include "${dir_path}"*"${file_name:0:-2}".gcda "; + fi + if [[ $line == ${splitter_line}* ]] ; then + break; + fi + done < "$input" + - mkdir ${TEST_RUN_DIR}/esp_cov_files + - rsync -a --prune-empty-dirs --include '*/' ${command_arg} --exclude '*' ${TEST_RUN_DIR}/${DIST_INSTALLED_DIR}/_build ${TEST_RUN_DIR}/esp_cov_files + - cp ${PWD}/${TEST_RUN_DIR}/${DIST_INSTALLED_DIR}/bin/gcov ${TEST_RUN_DIR}/esp_cov_files + # Patch up test reports to include IDF_RELEASE_TAG and CHIP_NAME in the test name + - sed ${TEST_RUN_DIR}/results/*.xml -i -e "s/testcase classname=\"/testcase classname=\"${IDF_RELEASE_TAG}-${CHIP_NAME}./g" + +.tests_master_template: + extends: .tests_template + image: $CI_DOCKER_REGISTRY/target-test-env-v6.0:1 + variables: + CHIP_TEST_TOOLCHAIN: "xtensa-${CHIP_NAME}" + ESP_GDB_TOOLCHAIN: "${ESP_V6_0X_XTENSA_GDB_TOOLCHAIN}" + TOOLCHAIN_PREFIX: "xtensa-esp" + ESP_TOOLCHAIN: "${ESP_V6_0X_TOOLCHAIN_VER}" + TEST_RUN_DIR: "build_test_app_${CHIP_NAME}" + IDF_RELEASE_TAG: "latest" + ESP_GCOV_TOOLCHAIN: "${ESP_V6_0X_XTENSA_GCOV_TOOLCHAIN}" + +.tests_master_riscv_template: + extends: .tests_master_template + variables: + CHIP_TEST_TOOLCHAIN: "riscv32-esp" + ESP_GDB_TOOLCHAIN: "${ESP_V6_0X_RISCV_GDB_TOOLCHAIN}" + TOOLCHAIN_PREFIX: "riscv32-esp" + ESP_GCOV_TOOLCHAIN: "${ESP_V6_0X_RISCV_GCOV_TOOLCHAIN}" + +.tests_v5.5.x_template: + extends: .tests_template + image: $CI_DOCKER_REGISTRY/target-test-env-v5.5:2 + variables: + CHIP_TEST_TOOLCHAIN: "xtensa-${CHIP_NAME}" + ESP_GDB_TOOLCHAIN: "${ESP_V5_5X_XTENSA_GDB_TOOLCHAIN}" + TOOLCHAIN_PREFIX: "xtensa-esp" + ESP_TOOLCHAIN: "${ESP_V5_5X_TOOLCHAIN_VER}" + TEST_RUN_DIR: "build_test_app_${CHIP_NAME}_idf5.5.x" + IDF_RELEASE_TAG: "${TEST_APP_IDF5_5_X_RELEASE_TAG}" + TEST_RUN_COMMON_ARGS: "-e *.*.test_big_binary *.*.test_big_binary_compressed" + ESP_GCOV_TOOLCHAIN: "${ESP_V5_5X_XTENSA_GCOV_TOOLCHAIN}" + +.tests_v5.5.x_riscv_template: + extends: .tests_v5.5.x_template + variables: + CHIP_TEST_TOOLCHAIN: "riscv32-esp" + ESP_GDB_TOOLCHAIN: "${ESP_V5_5X_RISCV_GDB_TOOLCHAIN}" + TOOLCHAIN_PREFIX: "riscv32-esp" + ESP_GCOV_TOOLCHAIN: "${ESP_V5_5X_RISCV_GCOV_TOOLCHAIN}" + +.tests_v5.4.x_template: + extends: .tests_template + image: $CI_DOCKER_REGISTRY/target-test-env-v5.4:2 + variables: + CHIP_TEST_TOOLCHAIN: "xtensa-${CHIP_NAME}" + ESP_GDB_TOOLCHAIN: "${ESP_V5_4X_XTENSA_GDB_TOOLCHAIN}" + TOOLCHAIN_PREFIX: "xtensa-esp" + ESP_TOOLCHAIN: "${ESP_V5_4X_TOOLCHAIN_VER}" + TEST_RUN_DIR: "build_test_app_${CHIP_NAME}_idf5.4.x" + IDF_RELEASE_TAG: "${TEST_APP_IDF5_4_X_RELEASE_TAG}" + TEST_RUN_COMMON_ARGS: "-e *.*.test_big_binary *.*.test_big_binary_compressed" + ESP_GCOV_TOOLCHAIN: "${ESP_V5_4X_XTENSA_GCOV_TOOLCHAIN}" + +.tests_v5.4.x_riscv_template: + extends: .tests_v5.4.x_template + variables: + CHIP_TEST_TOOLCHAIN: "riscv32-esp" + ESP_GDB_TOOLCHAIN: "${ESP_V5_4X_RISCV_GDB_TOOLCHAIN}" + TOOLCHAIN_PREFIX: "riscv32-esp" + ESP_GCOV_TOOLCHAIN: "${ESP_V5_4X_RISCV_GCOV_TOOLCHAIN}" + +.tests_v5.3.x_template: + extends: .tests_template + image: $CI_DOCKER_REGISTRY/target-test-env-v5.3:1 + variables: + CHIP_TEST_TOOLCHAIN: "xtensa-${CHIP_NAME}" + ESP_GDB_TOOLCHAIN: "${ESP_V5_3X_XTENSA_GDB_TOOLCHAIN}" + TOOLCHAIN_PREFIX: "xtensa-esp" + ESP_TOOLCHAIN: "${ESP_V5_3X_TOOLCHAIN_VER}" + TEST_RUN_DIR: "build_test_app_${CHIP_NAME}_idf5.3.x" + IDF_RELEASE_TAG: "${TEST_APP_IDF5_3_X_RELEASE_TAG}" + TEST_RUN_COMMON_ARGS: "-e *.*.test_big_binary *.*.test_big_binary_compressed" + +.tests_v5.3.x_riscv_template: + extends: .tests_v5.3.x_template + variables: + CHIP_TEST_TOOLCHAIN: "riscv32-esp" + ESP_GDB_TOOLCHAIN: "${ESP_V5_3X_RISCV_GDB_TOOLCHAIN}" + TOOLCHAIN_PREFIX: "riscv32-esp" + +.tests_v5.2.x_template: + extends: .tests_template + image: $CI_DOCKER_REGISTRY/target-test-env-v5.2:2 + variables: + CHIP_TEST_TOOLCHAIN: "xtensa-${CHIP_NAME}" + TEST_RUN_DIR: "build_test_app_${CHIP_NAME}_idf5.2.x" + ESP_GDB_TOOLCHAIN: "${ESP_V5_2X_XTENSA_GDB_TOOLCHAIN}" + TOOLCHAIN_PREFIX: "xtensa-esp" + ESP_TOOLCHAIN: "${ESP_V5_2X_TOOLCHAIN_VER}" + IDF_RELEASE_TAG: "${TEST_APP_IDF5_2_X_RELEASE_TAG}" + TEST_RUN_COMMON_ARGS: "-e *.*.test_big_binary *.*.test_big_binary_compressed" + +.tests_v5.2.x_riscv_template: + extends: .tests_v5.2.x_template + variables: + CHIP_TEST_TOOLCHAIN: "riscv32-esp" + ESP_GDB_TOOLCHAIN: "${ESP_V5_2X_RISCV_GDB_TOOLCHAIN}" + TOOLCHAIN_PREFIX: "riscv32-esp" + +.tests_v5.1.x_template: + extends: .tests_template + image: $CI_DOCKER_REGISTRY/target-test-env-v5.1:1 + variables: + CHIP_TEST_TOOLCHAIN: "xtensa-${CHIP_NAME}" + TEST_RUN_DIR: "build_test_app_${CHIP_NAME}_idf5.1.x" + ESP_GDB_TOOLCHAIN: "${ESP_V5_1X_XTENSA_GDB_TOOLCHAIN}" + TOOLCHAIN_PREFIX: "xtensa-${CHIP_NAME}" + ESP_TOOLCHAIN: "${ESP_V5_1X_TOOLCHAIN_VER}" + IDF_RELEASE_TAG: "${TEST_APP_IDF5_1_X_RELEASE_TAG}" + TEST_RUN_COMMON_ARGS: "-e *.*.test_big_binary *.*.test_big_binary_compressed" + +.tests_v5.1.x_riscv_template: + extends: .tests_v5.1.x_template + variables: + CHIP_TEST_TOOLCHAIN: "riscv32-esp" + ESP_GDB_TOOLCHAIN: "${ESP_V5_1X_RISCV_GDB_TOOLCHAIN}" + TOOLCHAIN_PREFIX: "riscv32-esp" diff --git a/.gitlab/ci/test.yml b/.gitlab/ci/test.yml deleted file mode 100644 index 60794b63f..000000000 --- a/.gitlab/ci/test.yml +++ /dev/null @@ -1,1348 +0,0 @@ -.tests_template: - tags: - - $CHIP_NAME - - jtag - variables: - RUNNER_SCRIPT_TIMEOUT: 60m - OOCD_CMDS: "set VAR 1" # default command to avoid missing argument error. - TEST_RUN_EXTRA_OPTS: "-r -i ${IDF_RELEASE_TAG} ${TEST_RUN_BOARD_OPTS} ${TEST_RUN_COMMON_ARGS}" - ESPTOOL_PORT: "/dev/serial_ports/ttyUSB-esp32" - artifacts: - paths: - - $TEST_RUN_DIR/debug_backend_tests.log - - $TEST_RUN_DIR/esp_cov_files - - $TEST_RUN_DIR/sanitizer_errors.log - reports: - junit: - - $TEST_RUN_DIR/results/* - when: always - expire_in: 1 week - before_script: - - export GCOV_PREFIX=$PWD/$TEST_RUN_DIR - - export GCOV_PREFIX_STRIP=2 - - pip install unittest-xml-reporting --no-deps - - pip install pygdbmi==0.9.0.2 - - ./tools/install-rom-elfs.sh - - > - machine="$(uname -m)"; - if [[ "$machine" == "armv7l" ]] ; then - export CONF_HOST="arm-linux-gnueabihf"; - export PLATFORM_NAME="linux-armhf-test"; - elif [[ "$machine" == "aarch64" ]] ; then - export CONF_HOST="aarch64-linux-gnu"; - export PLATFORM_NAME="linux-arm64-test"; - fi; - echo "PLATFORM_NAME: ${PLATFORM_NAME}"; - if [ ! -z "$ESP_GCOV_TOOLCHAIN" ] ; then - export ESP_GCOV_TOOLCHAIN="${ESP_GCOV_TOOLCHAIN}-${CONF_HOST}"; - echo "ESP_GCOV_TOOLCHAIN: ${ESP_GCOV_TOOLCHAIN}"; - fi; - if [[ $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "run_sanitizer_tests" ]] ; then - export ASAN_OPTIONS="detect_invalid_pointer_pairs=2:print_stacktrace=1:strict_string_checks=1:halt_on_error=0:allocator_may_return_null=1"; - export TEST_SANITIZERS=1; - cp ${CONF_HOST}/lib* /usr/lib; - fi - script: - - !reference [.submodules_mirror_update, script] - - !reference [.export_toolchain, script] - - . $PWD/${TEST_RUN_DIR}/gen_ut_app/gcov_data/gcov_env.sh - - !reference [.run_tests_linux, script] - after_script: - # Below lines gets esp related file paths from tools/format-esp.sh - # and change file extension as .gcno and .gcda - - > - input="tools/format-esp.sh"; - file_full_path=""; - dir_path=""; - file_name=""; - command_arg=""; - splitter_line="# Stub flasher related files"; - while IFS= read -r line ; do - if [[ ${line:0:2} == "./" ]] ; then - file_full_path=${line##*.sh }; - file_name=${file_full_path##*/} ; - dir_path=${file_full_path%$file_name} ; - command_arg+="--include "${dir_path}"*"${file_name:0:-2}".gcno "; - command_arg+="--include "${dir_path}"*"${file_name:0:-2}".gcda "; - fi - if [[ $line == ${splitter_line}* ]] ; then - break; - fi - done < "$input" - - mkdir ${TEST_RUN_DIR}/esp_cov_files - - rsync -a --prune-empty-dirs --include '*/' ${command_arg} --exclude '*' ${TEST_RUN_DIR}/${DIST_INSTALLED_DIR}/_build ${TEST_RUN_DIR}/esp_cov_files - - cp ${PWD}/${TEST_RUN_DIR}/${DIST_INSTALLED_DIR}/bin/gcov ${TEST_RUN_DIR}/esp_cov_files - -.tests_master_template: - extends: .tests_template - stage: test_idf_master - image: $CI_DOCKER_REGISTRY/target-test-env-v6.0:1 - variables: - CHIP_TEST_TOOLCHAIN: "xtensa-${CHIP_NAME}" - ESP_GDB_TOOLCHAIN: "${ESP_V6_0X_XTENSA_GDB_TOOLCHAIN}" - TOOLCHAIN_PREFIX: "xtensa-esp" - ESP_TOOLCHAIN: "${ESP_V6_0X_TOOLCHAIN_VER}" - TEST_RUN_DIR: "build_test_app_${CHIP_NAME}" - IDF_RELEASE_TAG: "latest" - ESP_GCOV_TOOLCHAIN: "${ESP_V6_0X_XTENSA_GCOV_TOOLCHAIN}" - -.tests_master_riscv_template: - extends: .tests_master_template - variables: - CHIP_TEST_TOOLCHAIN: "riscv32-esp" - ESP_GDB_TOOLCHAIN: "${ESP_V6_0X_RISCV_GDB_TOOLCHAIN}" - TOOLCHAIN_PREFIX: "riscv32-esp" - ESP_GCOV_TOOLCHAIN: "${ESP_V6_0X_RISCV_GCOV_TOOLCHAIN}" - -.tests_v5.5.x_template: - extends: .tests_template - stage: test_idf5.5.x - image: $CI_DOCKER_REGISTRY/target-test-env-v5.5:2 - variables: - CHIP_TEST_TOOLCHAIN: "xtensa-${CHIP_NAME}" - ESP_GDB_TOOLCHAIN: "${ESP_V5_5X_XTENSA_GDB_TOOLCHAIN}" - TOOLCHAIN_PREFIX: "xtensa-esp" - ESP_TOOLCHAIN: "${ESP_V5_5X_TOOLCHAIN_VER}" - TEST_RUN_DIR: "build_test_app_${CHIP_NAME}_idf5.5.x" - IDF_RELEASE_TAG: "${TEST_APP_IDF5_5_X_RELEASE_TAG}" - TEST_RUN_COMMON_ARGS: "-e *.*.test_big_binary *.*.test_big_binary_compressed" - ESP_GCOV_TOOLCHAIN: "${ESP_V5_5X_XTENSA_GCOV_TOOLCHAIN}" - -.tests_v5.5.x_riscv_template: - extends: .tests_v5.5.x_template - variables: - CHIP_TEST_TOOLCHAIN: "riscv32-esp" - ESP_GDB_TOOLCHAIN: "${ESP_V5_5X_RISCV_GDB_TOOLCHAIN}" - TOOLCHAIN_PREFIX: "riscv32-esp" - ESP_GCOV_TOOLCHAIN: "${ESP_V5_5X_RISCV_GCOV_TOOLCHAIN}" - -.tests_v5.4.x_template: - extends: .tests_template - stage: test_idf5.4.x - image: $CI_DOCKER_REGISTRY/target-test-env-v5.4:2 - variables: - CHIP_TEST_TOOLCHAIN: "xtensa-${CHIP_NAME}" - ESP_GDB_TOOLCHAIN: "${ESP_V5_4X_XTENSA_GDB_TOOLCHAIN}" - TOOLCHAIN_PREFIX: "xtensa-esp" - ESP_TOOLCHAIN: "${ESP_V5_4X_TOOLCHAIN_VER}" - TEST_RUN_DIR: "build_test_app_${CHIP_NAME}_idf5.4.x" - IDF_RELEASE_TAG: "${TEST_APP_IDF5_4_X_RELEASE_TAG}" - TEST_RUN_COMMON_ARGS: "-e *.*.test_big_binary *.*.test_big_binary_compressed" - ESP_GCOV_TOOLCHAIN: "${ESP_V5_4X_XTENSA_GCOV_TOOLCHAIN}" - -.tests_v5.4.x_riscv_template: - extends: .tests_v5.4.x_template - variables: - CHIP_TEST_TOOLCHAIN: "riscv32-esp" - ESP_GDB_TOOLCHAIN: "${ESP_V5_4X_RISCV_GDB_TOOLCHAIN}" - TOOLCHAIN_PREFIX: "riscv32-esp" - ESP_GCOV_TOOLCHAIN: "${ESP_V5_4X_RISCV_GCOV_TOOLCHAIN}" - -.tests_v5.3.x_template: - extends: .tests_template - stage: test_idf5.3.x - image: $CI_DOCKER_REGISTRY/target-test-env-v5.3:1 - variables: - CHIP_TEST_TOOLCHAIN: "xtensa-${CHIP_NAME}" - ESP_GDB_TOOLCHAIN: "${ESP_V5_3X_XTENSA_GDB_TOOLCHAIN}" - TOOLCHAIN_PREFIX: "xtensa-esp" - ESP_TOOLCHAIN: "${ESP_V5_3X_TOOLCHAIN_VER}" - TEST_RUN_DIR: "build_test_app_${CHIP_NAME}_idf5.3.x" - IDF_RELEASE_TAG: "${TEST_APP_IDF5_3_X_RELEASE_TAG}" - TEST_RUN_COMMON_ARGS: "-e *.*.test_big_binary *.*.test_big_binary_compressed" - -.tests_v5.3.x_riscv_template: - extends: .tests_v5.3.x_template - variables: - CHIP_TEST_TOOLCHAIN: "riscv32-esp" - ESP_GDB_TOOLCHAIN: "${ESP_V5_3X_RISCV_GDB_TOOLCHAIN}" - TOOLCHAIN_PREFIX: "riscv32-esp" - -.tests_v5.2.x_template: - extends: .tests_template - stage: test_idf5.2.x - image: $CI_DOCKER_REGISTRY/target-test-env-v5.2:2 - variables: - CHIP_TEST_TOOLCHAIN: "xtensa-${CHIP_NAME}" - TEST_RUN_DIR: "build_test_app_${CHIP_NAME}_idf5.2.x" - ESP_GDB_TOOLCHAIN: "${ESP_V5_2X_XTENSA_GDB_TOOLCHAIN}" - TOOLCHAIN_PREFIX: "xtensa-esp" - ESP_TOOLCHAIN: "${ESP_V5_2X_TOOLCHAIN_VER}" - IDF_RELEASE_TAG: "${TEST_APP_IDF5_2_X_RELEASE_TAG}" - TEST_RUN_COMMON_ARGS: "-e *.*.test_big_binary *.*.test_big_binary_compressed" - -.tests_v5.2.x_riscv_template: - extends: .tests_v5.2.x_template - variables: - CHIP_TEST_TOOLCHAIN: "riscv32-esp" - ESP_GDB_TOOLCHAIN: "${ESP_V5_2X_RISCV_GDB_TOOLCHAIN}" - TOOLCHAIN_PREFIX: "riscv32-esp" - -.tests_v5.1.x_template: - extends: .tests_template - stage: test_idf5.1.x - image: $CI_DOCKER_REGISTRY/target-test-env-v5.1:1 - variables: - CHIP_TEST_TOOLCHAIN: "xtensa-${CHIP_NAME}" - TEST_RUN_DIR: "build_test_app_${CHIP_NAME}_idf5.1.x" - ESP_GDB_TOOLCHAIN: "${ESP_V5_1X_XTENSA_GDB_TOOLCHAIN}" - TOOLCHAIN_PREFIX: "xtensa-${CHIP_NAME}" - ESP_TOOLCHAIN: "${ESP_V5_1X_TOOLCHAIN_VER}" - IDF_RELEASE_TAG: "${TEST_APP_IDF5_1_X_RELEASE_TAG}" - TEST_RUN_COMMON_ARGS: "-e *.*.test_big_binary *.*.test_big_binary_compressed" - -.tests_v5.1.x_riscv_template: - extends: .tests_v5.1.x_template - variables: - CHIP_TEST_TOOLCHAIN: "riscv32-esp" - ESP_GDB_TOOLCHAIN: "${ESP_V5_1X_RISCV_GDB_TOOLCHAIN}" - TOOLCHAIN_PREFIX: "riscv32-esp" - -############## -# IDF master # -############## - -tests_esp32: - extends: .tests_master_template - needs: - - job: build_test_app_esp32 - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32" - TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -e *.*Encrypted" - -tests_esp32_flash_encrypted: - extends: .tests_master_template - tags: - - test_jtag_arm_flash_encryption - needs: - - job: build_test_app_esp32 - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32" - TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -p test_*.*Encrypted" - -tests_esp32s2: - extends: .tests_master_template - needs: - - job: build_test_app_esp32s2 - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32s2" - TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*Single" - -tests_esp32s2_flash_encrypted: - extends: .tests_master_template - tags: - - test_jtag_arm_flash_encryption_esp32s2 - needs: - - job: build_test_app_esp32s2 - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32s2" - TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*SingleEncrypted" - -tests_esp32s3_dual: - extends: .tests_master_template - needs: - - job: build_test_app_esp32s3 - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32s3" - TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Dual" - -tests_esp32s3_single: - extends: .tests_master_template - needs: - - job: build_test_app_esp32s3 - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32s3" - OOCD_CMDS: "set ESP_ONLYCPU 1" - TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Single" - -tests_esp32c2: - extends: .tests_master_riscv_template - needs: - - job: build_test_app_esp32c2 - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32c2" - TEST_RUN_BOARD_OPTS: "-b esp32c2-ftdi -p test_*.*Single4MB test_*.*Single" - -tests_esp32c3: - extends: .tests_master_riscv_template - needs: - - job: build_test_app_esp32c3 - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32c3" - TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*Single" - -tests_esp32c3_flash_encrypted: - extends: .tests_master_riscv_template - tags: - - test_jtag_arm_flash_encryption_esp32c3 - needs: - - job: build_test_app_esp32c3 - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32c3" - TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*SingleEncrypted" - -.tests_esp32c5: - extends: .tests_master_riscv_template - tags: - - esp32c5 - - usb_serial_jtag - needs: - - job: build_test_app_esp32c5 - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32c5" - ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" - TEST_RUN_BOARD_OPTS: "-b esp32c5-builtin -p test_*.*Single" - -tests_esp32c6: - extends: .tests_master_riscv_template - tags: - - esp32c6 - - usb_serial_jtag - needs: - - job: build_test_app_esp32c6 - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32c6" - ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" - TEST_RUN_BOARD_OPTS: "-b esp32c6-builtin -p test_*.*Single4MB test_*.*Single" - -tests_esp32c61: - extends: .tests_master_riscv_template - tags: - - esp32c61 - - usb_serial_jtag - needs: - - job: build_test_app_esp32c61 - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32c61" - ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" - TEST_RUN_BOARD_OPTS: "-b esp32c61-builtin -p test_*.*Single" - -tests_esp32h2: - extends: .tests_master_riscv_template - tags: - - esp32h2 - - usb_serial_jtag - needs: - - job: build_test_app_esp32h2 - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32h2" - ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" - TEST_RUN_BOARD_OPTS: "-b esp32h2-builtin -p test_*.*Single4MB test_*.*Single" - -tests_esp32p4: - extends: .tests_master_riscv_template - needs: - - job: build_test_app_esp32p4 - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32p4" - TEST_RUN_BOARD_OPTS: "-b esp32p4-ftdi -p test_*.*Dual" - -############## -# IDF 5.5.X # -############## - -tests_esp32_idf5.5.x: - extends: .tests_v5.5.x_template - needs: - - job: build_test_app_esp32_idf5.5.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32" - TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -e *.*Encrypted" - -tests_esp32_idf5.5.x_flash_encrypted: - extends: .tests_v5.5.x_template - tags: - - test_jtag_arm_flash_encryption - needs: - - job: build_test_app_esp32_idf5.5.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32" - TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -p test_*.*Encrypted" - -tests_esp32s2_idf5.5.x: - extends: .tests_v5.5.x_template - needs: - - job: build_test_app_esp32s2_idf5.5.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32s2" - TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*Single" - -tests_esp32s2_idf5.5.x_flash_encrypted: - extends: .tests_v5.5.x_template - tags: - - test_jtag_arm_flash_encryption_esp32s2 - needs: - - job: build_test_app_esp32s2_idf5.5.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32s2" - TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*SingleEncrypted" - -tests_esp32s3_idf5.5.x_dual: - extends: .tests_v5.5.x_template - needs: - - job: build_test_app_esp32s3_idf5.5.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32s3" - TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Dual" - -tests_esp32s3_idf5.5.x_single: - extends: .tests_v5.5.x_template - needs: - - job: build_test_app_esp32s3_idf5.5.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32s3" - OOCD_CMDS: "set ESP_ONLYCPU 1" - TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Single" - -tests_esp32c2_idf5.5.x: - extends: .tests_v5.5.x_riscv_template - needs: - - job: build_test_app_esp32c2_idf5.5.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32c2" - TEST_RUN_BOARD_OPTS: "-b esp32c2-ftdi -p test_*.*Single4MB test_*.*Single" - -tests_esp32c3_idf5.5.x: - extends: .tests_v5.5.x_riscv_template - needs: - - job: build_test_app_esp32c3_idf5.5.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32c3" - TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*Single" - -tests_esp32c3_idf5.5.x_flash_encrypted: - extends: .tests_v5.5.x_riscv_template - tags: - - test_jtag_arm_flash_encryption_esp32c3 - needs: - - job: build_test_app_esp32c3_idf5.5.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32c3" - TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*SingleEncrypted" - -tests_esp32c5_idf5.5.x: - extends: .tests_v5.5.x_riscv_template - tags: - - esp32c5 - - usb_serial_jtag - needs: - - job: build_test_app_esp32c5_idf5.5.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32c5" - ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" - TEST_RUN_BOARD_OPTS: "-b esp32c5-builtin -p test_*.*Single" - -tests_esp32c6_idf5.5.x: - extends: .tests_v5.5.x_riscv_template - tags: - - esp32c6 - - usb_serial_jtag - needs: - - job: build_test_app_esp32c6_idf5.5.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32c6" - ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" - TEST_RUN_BOARD_OPTS: "-b esp32c6-builtin -p test_*.*Single4MB test_*.*Single" - -tests_esp32h2_idf5.5.x: - extends: .tests_v5.5.x_riscv_template - tags: - - esp32h2 - - usb_serial_jtag - needs: - - job: build_test_app_esp32h2_idf5.5.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32h2" - ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" - TEST_RUN_BOARD_OPTS: "-b esp32h2-builtin -p test_*.*Single4MB test_*.*Single" - -tests_esp32p4_idf5.5.x: - extends: .tests_v5.5.x_riscv_template - needs: - - job: build_test_app_esp32p4_idf5.5.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: fetch_gdb - optional: true - variables: - CHIP_NAME: "esp32p4" - TEST_RUN_BOARD_OPTS: "-b esp32p4-ftdi -p test_*.*Dual" - -############## -# IDF 5.4.X # -############## - -tests_esp32_idf5.4.x: - extends: .tests_v5.4.x_template - needs: - - job: build_test_app_esp32_idf5.4.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32" - TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -e *.*Encrypted" - -tests_esp32_idf5.4.x_flash_encrypted: - extends: .tests_v5.4.x_template - tags: - - test_jtag_arm_flash_encryption - needs: - - job: build_test_app_esp32_idf5.4.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32" - TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -p test_*.*Encrypted" - -tests_esp32s2_idf5.4.x: - extends: .tests_v5.4.x_template - needs: - - job: build_test_app_esp32s2_idf5.4.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32s2" - TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*Single" - -tests_esp32s2_idf5.4.x_flash_encrypted: - extends: .tests_v5.4.x_template - tags: - - test_jtag_arm_flash_encryption_esp32s2 - needs: - - job: build_test_app_esp32s2_idf5.4.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32s2" - TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*SingleEncrypted" - -tests_esp32s3_idf5.4.x_dual: - extends: .tests_v5.4.x_template - needs: - - job: build_test_app_esp32s3_idf5.4.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32s3" - TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Dual" - -tests_esp32s3_idf5.4.x_single: - extends: .tests_v5.4.x_template - needs: - - job: build_test_app_esp32s3_idf5.4.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32s3" - OOCD_CMDS: "set ESP_ONLYCPU 1" - TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Single" - -tests_esp32c2_idf5.4.x: - extends: .tests_v5.4.x_riscv_template - needs: - - job: build_test_app_esp32c2_idf5.4.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32c2" - TEST_RUN_BOARD_OPTS: "-b esp32c2-ftdi -p test_*.*Single4MB test_*.*Single" - -tests_esp32c3_idf5.4.x: - extends: .tests_v5.4.x_riscv_template - needs: - - job: build_test_app_esp32c3_idf5.4.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32c3" - TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*Single" - -tests_esp32c3_idf5.4.x_flash_encrypted: - extends: .tests_v5.4.x_riscv_template - tags: - - test_jtag_arm_flash_encryption_esp32c3 - needs: - - job: build_test_app_esp32c3_idf5.4.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32c3" - TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*SingleEncrypted" - -tests_esp32c6_idf5.4.x: - extends: .tests_v5.4.x_riscv_template - tags: - - esp32c6 - - usb_serial_jtag - needs: - - job: build_test_app_esp32c6_idf5.4.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32c6" - ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" - TEST_RUN_BOARD_OPTS: "-b esp32c6-builtin -p test_*.*Single4MB test_*.*Single" - -tests_esp32h2_idf5.4.x: - extends: .tests_v5.4.x_riscv_template - tags: - - esp32h2 - - usb_serial_jtag - needs: - - job: build_test_app_esp32h2_idf5.4.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32h2" - ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" - TEST_RUN_BOARD_OPTS: "-b esp32h2-builtin -p test_*.*Single4MB test_*.*Single" - -tests_esp32p4_idf5.4.x: - extends: .tests_v5.4.x_riscv_template - needs: - - job: build_test_app_esp32p4_idf5.4.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32p4" - TEST_RUN_BOARD_OPTS: "-b esp32p4-ftdi -p test_*.*Dual" - - -############## -# IDF 5.3.X # -############## - -tests_esp32_idf5.3.x: - extends: .tests_v5.3.x_template - needs: - - job: build_test_app_esp32_idf5.3.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32" - TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -e *.*Encrypted" - -tests_esp32_idf5.3.x_flash_encrypted: - extends: .tests_v5.3.x_template - tags: - - test_jtag_arm_flash_encryption - needs: - - job: build_test_app_esp32_idf5.3.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32" - TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -p test_*.*Encrypted" - -tests_esp32s2_idf5.3.x: - extends: .tests_v5.3.x_template - needs: - - job: build_test_app_esp32s2_idf5.3.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32s2" - TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*Single" - -tests_esp32s2_idf5.3.x_flash_encrypted: - extends: .tests_v5.3.x_template - tags: - - test_jtag_arm_flash_encryption_esp32s2 - needs: - - job: build_test_app_esp32s2_idf5.3.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32s2" - TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*SingleEncrypted" - -tests_esp32s3_idf5.3.x_dual: - extends: .tests_v5.3.x_template - needs: - - job: build_test_app_esp32s3_idf5.3.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32s3" - TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Dual" - -tests_esp32s3_idf5.3.x_single: - extends: .tests_v5.3.x_template - needs: - - job: build_test_app_esp32s3_idf5.3.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32s3" - OOCD_CMDS: "set ESP_ONLYCPU 1" - TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Single" - -tests_esp32c2_idf5.3.x: - extends: .tests_v5.3.x_riscv_template - needs: - - job: build_test_app_esp32c2_idf5.3.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32c2" - TEST_RUN_BOARD_OPTS: "-b esp32c2-ftdi -p test_*.*Single4MB test_*.*Single" - -tests_esp32c3_idf5.3.x: - extends: .tests_v5.3.x_riscv_template - needs: - - job: build_test_app_esp32c3_idf5.3.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32c3" - TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*Single" - -tests_esp32c3_idf5.3.x_flash_encrypted: - extends: .tests_v5.3.x_riscv_template - tags: - - test_jtag_arm_flash_encryption_esp32c3 - needs: - - job: build_test_app_esp32c3_idf5.3.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32c3" - TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*SingleEncrypted" - -tests_esp32c6_idf5.3.x: - extends: .tests_v5.3.x_riscv_template - tags: - - esp32c6 - - usb_serial_jtag - needs: - - job: build_test_app_esp32c6_idf5.3.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32c6" - ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" - TEST_RUN_BOARD_OPTS: "-b esp32c6-builtin -p test_*.*Single4MB test_*.*Single" - -tests_esp32h2_idf5.3.x: - extends: .tests_v5.3.x_riscv_template - tags: - - esp32h2 - - usb_serial_jtag - needs: - - job: build_test_app_esp32h2_idf5.3.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32h2" - ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" - TEST_RUN_BOARD_OPTS: "-b esp32h2-builtin -p test_*.*Single4MB test_*.*Single" - -tests_esp32p4_idf5.3.x: - extends: .tests_v5.3.x_riscv_template - needs: - - job: build_test_app_esp32p4_idf5.3.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32p4" - TEST_RUN_BOARD_OPTS: "-b esp32p4-ftdi -p test_*.*Dual" - - -############## -# IDF 5.2.X # -############## - -tests_esp32_idf5.2.x: - extends: .tests_v5.2.x_template - needs: - - job: build_test_app_esp32_idf5.2.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32" - TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -e *.*Encrypted" - -tests_esp32_idf5.2.x_flash_encrypted: - extends: .tests_v5.2.x_template - tags: - - test_jtag_arm_flash_encryption - needs: - - job: build_test_app_esp32_idf5.2.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32" - TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -p test_*.*Encrypted" - -tests_esp32s2_idf5.2.x: - extends: .tests_v5.2.x_template - needs: - - job: build_test_app_esp32s2_idf5.2.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32s2" - TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*Single" - -tests_esp32s2_idf5.2.x_flash_encrypted: - extends: .tests_v5.2.x_template - tags: - - test_jtag_arm_flash_encryption_esp32s2 - needs: - - job: build_test_app_esp32s2_idf5.2.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32s2" - TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*SingleEncrypted" - -tests_esp32s3_idf5.2.x_dual: - extends: .tests_v5.2.x_template - needs: - - job: build_test_app_esp32s3_idf5.2.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32s3" - TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Dual" - -tests_esp32s3_idf5.2.x_single: - extends: .tests_v5.2.x_template - needs: - - job: build_test_app_esp32s3_idf5.2.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32s3" - OOCD_CMDS: "set ESP_ONLYCPU 1" - TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Single" - -tests_esp32c2_idf5.2.x: - extends: .tests_v5.2.x_riscv_template - needs: - - job: build_test_app_esp32c2_idf5.2.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32c2" - TEST_RUN_BOARD_OPTS: "-b esp32c2-ftdi -p test_*.*Single4MB test_*.*Single" - -tests_esp32c3_idf5.2.x: - extends: .tests_v5.2.x_riscv_template - needs: - - job: build_test_app_esp32c3_idf5.2.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32c3" - TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*Single" - -tests_esp32c3_idf5.2.x_flash_encrypted: - extends: .tests_v5.2.x_riscv_template - tags: - - test_jtag_arm_flash_encryption_esp32c3 - needs: - - job: build_test_app_esp32c3_idf5.2.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32c3" - TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*SingleEncrypted" - -tests_esp32c6_idf5.2.x: - extends: .tests_v5.2.x_riscv_template - tags: - - esp32c6 - - usb_serial_jtag - needs: - - job: build_test_app_esp32c6_idf5.2.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32c6" - ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" - TEST_RUN_BOARD_OPTS: "-b esp32c6-builtin -p test_*.*Single4MB test_*.*Single" - -tests_esp32h2_idf5.2.x: - extends: .tests_v5.2.x_riscv_template - tags: - - esp32h2 - - usb_serial_jtag - needs: - - job: build_test_app_esp32h2_idf5.2.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32h2" - ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" - TEST_RUN_BOARD_OPTS: "-b esp32h2-builtin -p test_*.*Single4MB test_*.*Single" - -############# -# IDF 5.1.X # -############# - -tests_esp32_idf5.1.x: - extends: .tests_v5.1.x_template - needs: - - job: build_test_app_esp32_idf5.1.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32" - TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -e *.*Encrypted" - -tests_esp32_idf5.1.x_flash_encrypted: - extends: .tests_v5.1.x_template - tags: - - test_jtag_arm_flash_encryption - needs: - - job: build_test_app_esp32_idf5.1.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32" - TEST_RUN_BOARD_OPTS: "-b esp32-wrover-kit-3.3v -p test_*.*Encrypted" - -tests_esp32s2_idf5.1.x: - extends: .tests_v5.1.x_template - needs: - - job: build_test_app_esp32s2_idf5.1.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32s2" - TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*Single" - -tests_esp32s2_idf5.1.x_flash_encrypted: - extends: .tests_v5.1.x_template - tags: - - test_jtag_arm_flash_encryption_esp32s2 - needs: - - job: build_test_app_esp32s2_idf5.1.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32s2" - TEST_RUN_BOARD_OPTS: "-b esp32s2-devkitj -p test_*.*SingleEncrypted" - -tests_esp32s3_idf5.1.x_dual: - extends: .tests_v5.1.x_template - needs: - - job: build_test_app_esp32s3_idf5.1.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32s3" - TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Dual" - -tests_esp32s3_idf5.1.x_single: - extends: .tests_v5.1.x_template - needs: - - job: build_test_app_esp32s3_idf5.1.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32s3" - OOCD_CMDS: "set ESP_ONLYCPU 1" - TEST_RUN_BOARD_OPTS: "-b esp32s3-ftdi -p test_*.*Single" - -tests_esp32c2_idf5.1.x: - extends: .tests_v5.1.x_riscv_template - needs: - - job: build_test_app_esp32c2_idf5.1.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32c2" - TEST_RUN_BOARD_OPTS: "-b esp32c2-ftdi -p test_*.*Single4MB test_*.*Single" - -tests_esp32c3_idf5.1.x: - extends: .tests_v5.1.x_riscv_template - needs: - - job: build_test_app_esp32c3_idf5.1.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32c3" - TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*Single" - -tests_esp32c3_idf5.1.x_flash_encrypted: - extends: .tests_v5.1.x_riscv_template - tags: - - test_jtag_arm_flash_encryption_esp32c3 - needs: - - job: build_test_app_esp32c3_idf5.1.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32c3" - TEST_RUN_BOARD_OPTS: "-b esp32c3-ftdi -p test_*.*SingleEncrypted" - -tests_esp32c6_idf5.1.x: - extends: .tests_v5.1.x_riscv_template - tags: - - esp32c6 - - usb_serial_jtag - needs: - - job: build_test_app_esp32c6_idf5.1.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32c6" - ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" - TEST_RUN_BOARD_OPTS: "-b esp32c6-builtin -p test_*.*Single4MB test_*.*Single" - -tests_esp32h2_idf5.1.x: - extends: .tests_v5.1.x_riscv_template - tags: - - esp32h2 - - usb_serial_jtag - needs: - - job: build_test_app_esp32h2_idf5.1.x - - job: build_linux_arm64_test - - job: build_linux_armhf_test - variables: - CHIP_NAME: "esp32h2" - ESPTOOL_PORT: "/dev/serial_ports/ttyACM-esp32" - TEST_RUN_BOARD_OPTS: "-b esp32h2-builtin -p test_*.*Single4MB test_*.*Single" - -############# -# HOST TEST # -############# - -.run_openocd_unix: &run_openocd_unix | - ARCHIVE_NAME=$(cat "$DIST_ART_DIR/dist_name_$PLATFORM_NAME") - echo $ARCHIVE_NAME - tar xzf $DIST_ART_DIR/$ARCHIVE_NAME openocd-esp32 - python tools/test_openocd.py openocd-esp32/bin/openocd - -test_on_windows: - stage: test_host - tags: - - test_jtag_win - needs: - - job: build_windows_win32 - variables: - # actually we don't need the project sources, but we need the `git clean` gitlab-runner's stage. - # It's possible only for `fetch` or `clone`. - GIT_STRATEGY: fetch - PLATFORM_NAME: "win32" - before_script: [] - script: - - $ARCHIVE_NAME=$(cat "$DIST_ART_DIR/dist_name_$PLATFORM_NAME") - - Expand-Archive -DestinationPath . "$DIST_ART_DIR/$ARCHIVE_NAME" - - python tools/test_openocd.py openocd-esp32\bin\openocd - -test_on_macos: - stage: test_host - tags: - - darwin - - amd64 - needs: - - job: build_macos - variables: - # actually we don't need the project sources, but we need the `git clean` gitlab-runner's stage. - # It's possible only for `fetch` or `clone`. - GIT_STRATEGY: fetch - PLATFORM_NAME: "macos" - before_script: [] - script: - - *run_openocd_unix - -tests_on_macos_arm64: - stage: test_host - tags: - - darwin - - aarch64 - needs: - - job: build_macos_arm64 - variables: - # actually we don't need the project sources, but we need the `git clean` gitlab-runner's stage. - # It's possible only for `fetch` or `clone`. - GIT_STRATEGY: fetch - PLATFORM_NAME: "macos-arm64" - before_script: [] - script: - - *run_openocd_unix - -tests_on_linux: - stage: test_host - image: $CI_DOCKER_REGISTRY/esp-env-v5.1:1 - tags: - - build - needs: - - job: build_linux - variables: - # actually we don't need the project sources, but we need the `git clean` gitlab-runner's stage. - # It's possible only for `fetch` or `clone`. - GIT_STRATEGY: fetch - PLATFORM_NAME: "linux-amd64" - before_script: [] - script: - - *run_openocd_unix - -########### -# NUTTX # -########### - -# nuttx build environment is nuttx/build-env-v5.1 -.test_nuttx_template: - extends: .tests_v5.1.x_template - stage: test_nuttx - allow_failure: true - variables: - RUNNER_SCRIPT_TIMEOUT: 5m - TEST_RUN_DIR: "build_test_app_${CHIP_NAME}_nuttx_test" - NUTTX_APP_NAME: "nuttx_openocd" - OOCD_CMDS: "set ESP_RTOS nuttx,set ESP_ONLYCPU 1" - IDF_RELEASE_TAG: "other" - TEST_RUN_BOARD_OPTS: "-b ${TEST_BOARD} -p test_nuttx -e *.*Encrypted" - needs: - - job: build_linux_arm64_test - - job: build_linux_armhf_test - - job: build_nuttx_app - artifacts: false - - project: idf/apache/esp-nuttx-apps - job: build_openocd_${CHIP_NAME} - ref: master - script: - - !reference [.export_toolchain, script] - - mkdir -p $TEST_RUN_DIR/$NUTTX_APP_NAME - - !reference [.copy_nuttx_files, script] - - !reference [.run_tests_linux, script] - -.test_nuttx_riscv_template: - extends: .test_nuttx_template - variables: - TOOLCHAIN_PREFIX: "riscv32-esp" - ESP_GDB_TOOLCHAIN: "${ESP_V5_1X_RISCV_GDB_TOOLCHAIN}" - CHIP_TEST_TOOLCHAIN: "riscv32-esp" - -test_nuttx_esp32: - extends: - - .test_nuttx_template - variables: - CHIP_NAME: esp32 - TEST_BOARD: "esp32-wrover-kit-3.3v" - -test_nuttx_esp32s2: - extends: - - .test_nuttx_template - variables: - CHIP_NAME: esp32s2 - TEST_BOARD: "esp32s2-devkitj" - -test_nuttx_esp32s3: - extends: - - .test_nuttx_template - variables: - CHIP_NAME: esp32s3 - TEST_BOARD: "esp32s3-ftdi" - -test_nuttx_esp32c3: - extends: - - .test_nuttx_riscv_template - variables: - CHIP_NAME: esp32c3 - TEST_BOARD: "esp32c3-ftdi" - -test_nuttx_esp32c6: - extends: - - .test_nuttx_riscv_template - tags: - - esp32c6 - - usb_serial_jtag - variables: - CHIP_NAME: esp32c6 - TEST_BOARD: "esp32c6-builtin" - -test_nuttx_esp32h2: - extends: - - .test_nuttx_riscv_template - tags: - - esp32h2 - - usb_serial_jtag - variables: - CHIP_NAME: esp32h2 - TEST_BOARD: "esp32h2-builtin" - -#################### -# Board Detector # -#################### - -.test_board_detector_template: - stage: test_host - image: $CI_DOCKER_REGISTRY/target-test-env-v5.5:2 - tags: - - $CHIP_NAME - - $JTAG_IFACE - needs: - - job: build_linux_arm64 - - job: build_linux_armhf - variables: - GIT_STRATEGY: fetch - artifacts: - paths: - - artifacts/esp-config.json - when: always - expire_in: 1 day - before_script: - - > - machine="$(uname -m)"; - if [[ "$machine" == "armv7l" ]] ; then - export PLATFORM_NAME="linux-armhf"; - elif [[ "$machine" == "aarch64" ]] ; then - export PLATFORM_NAME="linux-arm64"; - fi; - echo "PLATFORM_NAME: ${PLATFORM_NAME}"; - script: - - OUTPUT_DIR=$PWD/artifacts - - mkdir -p $OUTPUT_DIR - - ARCHIVE_NAME=$(cat "$DIST_ART_DIR/dist_name_$PLATFORM_NAME") - - echo $ARCHIVE_NAME - - tar xzf $DIST_ART_DIR/$ARCHIVE_NAME openocd-esp32 - - OOCD_DIR=$PWD/openocd-esp32 - - OOCD_SCRIPTS_DIR=$OOCD_DIR/share/openocd/scripts - - OOCD_TOOLS_DIR=$OOCD_DIR/share/openocd/espressif/tools - - python $OOCD_TOOLS_DIR/esp_detect_config.py -b $OOCD_DIR/bin/openocd -s $OOCD_SCRIPTS_DIR -c $OOCD_SCRIPTS_DIR/esp-config.json -o $OUTPUT_DIR/esp-config.json -d 4 - - python $PWD/testing/esp/check_esp_config.py $OUTPUT_DIR/esp-config.json -c $CHIP_NAME -i $JTAG_IFACE -d 4 - -test_board_detector_esp32_jtag: - extends: .test_board_detector_template - variables: - CHIP_NAME: "esp32" - JTAG_IFACE: "jtag" - -test_board_detector_esp32s3_jtag: - extends: .test_board_detector_template - variables: - CHIP_NAME: "esp32s3" - JTAG_IFACE: "jtag" - -test_board_detector_esp32c3_jtag: - extends: .test_board_detector_template - variables: - CHIP_NAME: "esp32c3" - JTAG_IFACE: "jtag" - -test_board_detector_esp32c5_usj: - extends: .test_board_detector_template - variables: - CHIP_NAME: "esp32c5" - JTAG_IFACE: "usb_serial_jtag" - -test_board_detector_esp32c6_usj: - extends: .test_board_detector_template - variables: - CHIP_NAME: "esp32c6" - JTAG_IFACE: "usb_serial_jtag" - -test_board_detector_esp32p4_jtag: - extends: .test_board_detector_template - variables: - CHIP_NAME: "esp32p4" - JTAG_IFACE: "jtag" diff --git a/.gitlab/ci/util.yml b/.gitlab/ci/util.yml index cc7412094..a611bb4f6 100644 --- a/.gitlab/ci/util.yml +++ b/.gitlab/ci/util.yml @@ -50,7 +50,7 @@ echo "CHIP_TEST_TOOLCHAIN: ${CHIP_TEST_TOOLCHAIN}" set +e testing/esp/run_tests.py -o $DIST_DIR/bin/openocd -s $DIST_DIR/share/openocd/scripts -a $PWD/$TEST_RUN_DIR -t ${CHIP_TEST_TOOLCHAIN}-elf- -d 4 -l $PWD/$TEST_RUN_DIR/debug_backend_tests.log -tr x -to $PWD/$TEST_RUN_DIR/results $TEST_RUN_EXTRA_OPTS -c "${OOCD_CMDS}" -u $ESPTOOL_PORT || exit $? - if [[ $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "run_sanitizer_tests" ]] ; then + if [[ $SCHEDULE_TYPE == "run_sanitizer_tests" ]] ; then grep -i -e".*sanitizer" -e"runtime error" ${TEST_RUN_DIR}/debug_backend_tests.log > ${TEST_RUN_DIR}/sanitizer_errors.log || true # fail if `sanitizer_errors.log` is not empty [[ ! -s ${TEST_RUN_DIR}/sanitizer_errors.log ]] From 3ebc7e219256fc6758168c80dfccb55427aca4c9 Mon Sep 17 00:00:00 2001 From: Samuel Obuch Date: Tue, 1 Jul 2025 17:19:15 +0200 Subject: [PATCH 2/4] ci: only autorun idf-master tests except flash --- .gitlab-ci.yml | 15 ++++++++++++++- .gitlab/ci/downstream/build-test-app-template.yml | 5 +++++ .gitlab/ci/downstream/child-pipeline-template.yml | 5 +++++ .gitlab/ci/run-pipeline.yml | 2 ++ .gitlab/ci/test-template.yml | 10 ++++------ 5 files changed, 30 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 923eb141b..5ce434521 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -96,7 +96,20 @@ pipeline_variables: variables: GIT_STRATEGY: none script: - - echo "TRIGGERED_BY_GDB_PIPELINE_BRANCH=${TRIGGERED_BY_GDB_PIPELINE_BRANCH:-}" >> variables.env + - > + echo "TRIGGERED_BY_GDB_PIPELINE_BRANCH=${TRIGGERED_BY_GDB_PIPELINE_BRANCH:-}" >> variables.env; + if [[ ! -z ${TRIGGERED_BY_GDB_PIPELINE_BRANCH:-} ]]; then + echo "CI_FULL_RUN=0" >> variables.env; + elif [[ $CI_PIPELINE_SOURCE != "push" || $CI_COMMIT_BRANCH == "master" ]]; then + echo "CI_FULL_RUN=1" >> variables.env; + else + api_call="https://${CI_SERVER_HOST}:${CI_SERVER_PORT}/api/v4/projects/67/merge_requests?source_branch=${CI_COMMIT_REF_NAME}&state=opened"; + echo "${api_call}"; + OPEN_MR=$(curl --header "PRIVATE-TOKEN: ${ESPCI_TOKEN}" "${api_call}"); + echo $OPEN_MR; + ready=$(echo "$OPEN_MR" | python3 -c "import json; x=json.loads(input()); print(1 if len(x) and 'labels' in x[0] and 'ready_to_merge' in x[0]['labels'] else 0)"); + echo "CI_FULL_RUN=${ready}" >> variables.env; + fi artifacts: reports: dotenv: variables.env diff --git a/.gitlab/ci/downstream/build-test-app-template.yml b/.gitlab/ci/downstream/build-test-app-template.yml index 0443dd901..8cb07e151 100644 --- a/.gitlab/ci/downstream/build-test-app-template.yml +++ b/.gitlab/ci/downstream/build-test-app-template.yml @@ -140,6 +140,11 @@ - *prepare_espytrace_package - *prepare_sysview_config needs: [] + rules: + - if: '$CI_FULL_RUN == "1" || $UT_GET_IDF_VER == "0"' + when: always + - when: manual + allow_failure: true .build_idf51x_test_app_template: variables: diff --git a/.gitlab/ci/downstream/child-pipeline-template.yml b/.gitlab/ci/downstream/child-pipeline-template.yml index f07580646..14c21f1a1 100644 --- a/.gitlab/ci/downstream/child-pipeline-template.yml +++ b/.gitlab/ci/downstream/child-pipeline-template.yml @@ -56,6 +56,11 @@ fetch_gdb: paths: - gdb +dummy_job: + script: echo "Pipeline skipped" + rules: + - if: '$CI_FULL_RUN == "0" && $IDF_MASTER_RUN == "0"' + include: - '.gitlab/ci/downstream/build-test-app-template.yml' - '.gitlab/ci/util.yml' diff --git a/.gitlab/ci/run-pipeline.yml b/.gitlab/ci/run-pipeline.yml index 1c0ba4aae..736ade62c 100644 --- a/.gitlab/ci/run-pipeline.yml +++ b/.gitlab/ci/run-pipeline.yml @@ -1,6 +1,7 @@ .run_test_pipeline: stage: run_test_pipelines needs: + - job: pipeline_variables - job: build_linux_arm64_test - job: build_linux_armhf_test variables: @@ -8,6 +9,7 @@ TRIGGERED_BY_GDB_PIPELINE_BRANCH: $TRIGGERED_BY_GDB_PIPELINE_BRANCH SCHEDULE_TYPE: $SCHEDULE_TYPE IDF_MASTER_RUN: "0" + CI_FULL_RUN: $CI_FULL_RUN 5.1.x_run_test_pipeline: extends: .run_test_pipeline diff --git a/.gitlab/ci/test-template.yml b/.gitlab/ci/test-template.yml index 6d6e5e9ce..cad706b3d 100644 --- a/.gitlab/ci/test-template.yml +++ b/.gitlab/ci/test-template.yml @@ -6,7 +6,7 @@ variables: RUNNER_SCRIPT_TIMEOUT: 60m OOCD_CMDS: "set VAR 1" # default command to avoid missing argument error. - TEST_RUN_EXTRA_OPTS: "-r -i ${IDF_RELEASE_TAG} ${TEST_RUN_BOARD_OPTS} ${TEST_RUN_COMMON_ARGS}" + TEST_RUN_EXTRA_OPTS: "-r -i ${IDF_RELEASE_TAG} ${TEST_RUN_BOARD_OPTS}" ESPTOOL_PORT: "/dev/serial_ports/ttyUSB-esp32" artifacts: paths: @@ -43,6 +43,9 @@ export ASAN_OPTIONS="detect_invalid_pointer_pairs=2:print_stacktrace=1:strict_string_checks=1:halt_on_error=0:allocator_may_return_null=1"; export TEST_SANITIZERS=1; cp ${CONF_HOST}/lib* /usr/lib; + fi; + if [[ $IDF_RELEASE_TAG != "latest" || $CI_FULL_RUN != "1" ]] ; then + export TEST_RUN_EXTRA_OPTS="${TEST_RUN_EXTRA_OPTS} -e *.*.test_big_binary *.*.test_big_binary_compressed"; fi script: - !reference [.submodules_mirror_update, script] @@ -107,7 +110,6 @@ ESP_TOOLCHAIN: "${ESP_V5_5X_TOOLCHAIN_VER}" TEST_RUN_DIR: "build_test_app_${CHIP_NAME}_idf5.5.x" IDF_RELEASE_TAG: "${TEST_APP_IDF5_5_X_RELEASE_TAG}" - TEST_RUN_COMMON_ARGS: "-e *.*.test_big_binary *.*.test_big_binary_compressed" ESP_GCOV_TOOLCHAIN: "${ESP_V5_5X_XTENSA_GCOV_TOOLCHAIN}" .tests_v5.5.x_riscv_template: @@ -128,7 +130,6 @@ ESP_TOOLCHAIN: "${ESP_V5_4X_TOOLCHAIN_VER}" TEST_RUN_DIR: "build_test_app_${CHIP_NAME}_idf5.4.x" IDF_RELEASE_TAG: "${TEST_APP_IDF5_4_X_RELEASE_TAG}" - TEST_RUN_COMMON_ARGS: "-e *.*.test_big_binary *.*.test_big_binary_compressed" ESP_GCOV_TOOLCHAIN: "${ESP_V5_4X_XTENSA_GCOV_TOOLCHAIN}" .tests_v5.4.x_riscv_template: @@ -149,7 +150,6 @@ ESP_TOOLCHAIN: "${ESP_V5_3X_TOOLCHAIN_VER}" TEST_RUN_DIR: "build_test_app_${CHIP_NAME}_idf5.3.x" IDF_RELEASE_TAG: "${TEST_APP_IDF5_3_X_RELEASE_TAG}" - TEST_RUN_COMMON_ARGS: "-e *.*.test_big_binary *.*.test_big_binary_compressed" .tests_v5.3.x_riscv_template: extends: .tests_v5.3.x_template @@ -168,7 +168,6 @@ TOOLCHAIN_PREFIX: "xtensa-esp" ESP_TOOLCHAIN: "${ESP_V5_2X_TOOLCHAIN_VER}" IDF_RELEASE_TAG: "${TEST_APP_IDF5_2_X_RELEASE_TAG}" - TEST_RUN_COMMON_ARGS: "-e *.*.test_big_binary *.*.test_big_binary_compressed" .tests_v5.2.x_riscv_template: extends: .tests_v5.2.x_template @@ -187,7 +186,6 @@ TOOLCHAIN_PREFIX: "xtensa-${CHIP_NAME}" ESP_TOOLCHAIN: "${ESP_V5_1X_TOOLCHAIN_VER}" IDF_RELEASE_TAG: "${TEST_APP_IDF5_1_X_RELEASE_TAG}" - TEST_RUN_COMMON_ARGS: "-e *.*.test_big_binary *.*.test_big_binary_compressed" .tests_v5.1.x_riscv_template: extends: .tests_v5.1.x_template From 63e4279cf5b89d5ab59ecb2a19d6b10fe31efd1e Mon Sep 17 00:00:00 2001 From: Samuel Obuch Date: Tue, 8 Jul 2025 11:48:05 +0200 Subject: [PATCH 3/4] ci: dont download artifacts in release tag jobs --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5ce434521..fbae7888f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -170,6 +170,7 @@ Release_tag_submit: tags: [ "amd64", "internet" ] <<: *release_tag_filter <<: *release_submit_action + dependencies: [] script: - hub release create -m "${RELEASE_DESC}" ${GH_REL_TAG} @@ -178,6 +179,7 @@ Pre-Release_tag_submit: tags: [ "amd64", "internet" ] <<: *release_tag_filter <<: *release_submit_action + dependencies: [] script: - hub release create --prerelease -m "${RELEASE_DESC}" ${GH_REL_TAG} @@ -186,6 +188,7 @@ Delete_tag_release: tags: [ "amd64", "internet" ] <<: *release_tag_filter <<: *release_submit_action + dependencies: [] script: - hub release delete ${GH_REL_TAG} From bf23b172c684120a36e96d7293a73322580e0f72 Mon Sep 17 00:00:00 2001 From: Samuel Obuch Date: Thu, 17 Jul 2025 10:04:47 +0200 Subject: [PATCH 4/4] ci: add auto approve job in full pipeline --- .gitlab-ci.yml | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fbae7888f..b2f039144 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,7 +6,7 @@ stages: - build_nuttx - test_host - test_nuttx - - coverage + - results - deploy - pre_release - release_stage1 @@ -209,8 +209,8 @@ test_idf_examples: - job: build_linux_armhf - job: build_linux_arm64 -create_coverage_reports: - stage: coverage +create_reports: + stage: results tags: - build artifacts: @@ -290,6 +290,29 @@ create_coverage_reports: - python3 tools/list_to_metrics.py --file cov_infos/metrics_input.txt - lcov_cobertura cov_infos/merged.info -o cov_infos/cobertura.xml +mr_auto_approve: + stage: results + tags: + - build + dependencies: + - pipeline_variables + when: on_success + script: + - > + if [[ -z ${TRIGGERED_BY_GDB_PIPELINE_BRANCH:-} && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH != "master" && $CI_FULL_RUN == "1" ]]; then + api_call="https://${CI_SERVER_HOST}:${CI_SERVER_PORT}/api/v4/projects/67/merge_requests?source_branch=${CI_COMMIT_REF_NAME}&state=opened"; + echo "${api_call}"; + OPEN_MR=$(curl --header "PRIVATE-TOKEN: ${ESPCI_TOKEN}" "${api_call}"); + echo $OPEN_MR; + iid=$(echo "$OPEN_MR" | python3 -c "import json; x=json.loads(input()); print(x[0]['iid'] if len(x) and 'iid' in x[0] else 0)"); + target=$(echo "$OPEN_MR" | python3 -c "import json; x=json.loads(input()); print(x[0]['target_branch'] if len(x) and 'target_branch' in x[0] else "")"); + if [[ $iid != "0" $target == "master" ]]; then + api_call="https://${CI_SERVER_HOST}:${CI_SERVER_PORT}/api/v4/projects/67/merge_requests/${iid}/approve"; + echo "${api_call}"; + curl --request POST --header "PRIVATE-TOKEN: ${ESPCI_TOKEN}" "${api_call}"; + fi + fi + update_idf_tools: stage: update_idf_tools when: manual pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy