diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 35b85c9ebc..505582fbbb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -331,8 +331,8 @@ create_coverage_reports: for each_folder in $folder_list ; do lcov --gcov-tool ${PWD}/${each_folder}/esp_cov_files/gcov --capture --directory ${each_folder}/esp_cov_files --output-file ${each_folder}/${each_folder}.info; - cp ${each_folder}/*.info cov_infos; done + - cp `find . -wholename "./build_test_app*/*.info" -size +0` cov_infos - ls -la cov_infos/ # Creating a html report of coverage files. - genhtml --ignore-errors source cov_infos/*.info -o lcov_html_report/ diff --git a/.gitlab/ci/test-sanitizers.yml b/.gitlab/ci/test-sanitizers.yml index d57bc8de27..e2190cdd1a 100644 --- a/.gitlab/ci/test-sanitizers.yml +++ b/.gitlab/ci/test-sanitizers.yml @@ -21,6 +21,7 @@ - !reference [.submodules_mirror_update, script] - !reference [.export_toolchain, script] - export ASAN_OPTIONS=detect_invalid_pointer_pairs=2:print_stacktrace=1:strict_string_checks=1:halt_on_error=0:allocator_may_return_null=1 + - . $PWD/${TEST_RUN_DIR}/gen_ut_app/gcov_data/gcov_env.sh - !reference [.run_tests_linux, script] .tests_sanitizers_master_template: @@ -444,7 +445,7 @@ test_sanitizers_nuttx_esp32: - mkdir -p $TEST_RUN_DIR/$NUTTX_APP_NAME - !reference [.copy_nuttx_files, script] - export ASAN_OPTIONS=detect_invalid_pointer_pairs=2:print_stacktrace=1:strict_string_checks=1:halt_on_error=0:allocator_may_return_null=1 - - !reference [.run_tests_nuttx, script] + - !reference [.run_tests_linux, script] ########### # MISC # diff --git a/.gitlab/ci/test.yml b/.gitlab/ci/test.yml index 58374b9536..bdc47e4bca 100644 --- a/.gitlab/ci/test.yml +++ b/.gitlab/ci/test.yml @@ -24,6 +24,7 @@ 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 @@ -701,6 +702,7 @@ tests_on_linux: # nuttx build environment is nuttx/build-env-v5.1 .test_nuttx_template: + extends: .tests_armhf_template image: $CI_DOCKER_REGISTRY/target-test-env-v5.1:1 stage: test_nuttx allow_failure: true @@ -708,28 +710,13 @@ tests_on_linux: default: - interruptible # Dont retry - tags: - - $CHIP - - jtag - artifacts: - paths: - - $TEST_RUN_DIR/debug_backend_tests.log - reports: - junit: - - $TEST_RUN_DIR/results/* - when: always - expire_in: 1 week - before_script: - - pip install unittest-xml-reporting --no-deps - - pip install pygdbmi==0.9.0.2 variables: RUNNER_SCRIPT_TIMEOUT: 5m - PLATFORM_NAME: "linux-armhf-test" ESP_TOOLCHAIN: "${ESP_V5_1X_TOOLCHAIN_VER}" ESP_GDB_TOOLCHAIN: "${ESP_V5_1X_XTENSA_GDB_TOOLCHAIN}" - TOOLCHAIN_PREFIX: "xtensa-${CHIP}" - CHIP_TEST_TOOLCHAIN: "xtensa-${CHIP}" - TEST_RUN_DIR: "nuttx_test" + TOOLCHAIN_PREFIX: "xtensa-${CHIP_NAME}" + CHIP_TEST_TOOLCHAIN: "xtensa-${CHIP_NAME}" + 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" TEST_RUN_EXTRA_OPTS: "-i other -b ${TEST_BOARD} -p test_nuttx -e *.*Encrypted" @@ -738,40 +725,40 @@ tests_on_linux: - job: build_nuttx_app artifacts: false - project: idf/apache/esp-nuttx-apps - job: build_openocd_${CHIP} + 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_nuttx, script] + - !reference [.run_tests_linux, script] test_nuttx_esp32: extends: - .test_nuttx_template variables: - CHIP: esp32 + CHIP_NAME: esp32 TEST_BOARD: "esp32-wrover-kit-3.3v" test_nuttx_esp32s2: extends: - .test_nuttx_template variables: - CHIP: esp32s2 + CHIP_NAME: esp32s2 TEST_BOARD: "esp32s2-devkitj" test_nuttx_esp32s3: extends: - .test_nuttx_template variables: - CHIP: esp32s3 + CHIP_NAME: esp32s3 TEST_BOARD: "esp32s3-ftdi" test_nuttx_esp32c3: extends: - .test_nuttx_template variables: - CHIP: esp32c3 + CHIP_NAME: esp32c3 TEST_BOARD: "esp32c3-ftdi" TOOLCHAIN_PREFIX: "riscv32-esp" ESP_GDB_TOOLCHAIN: "${ESP_V5_1X_RISCV_GDB_TOOLCHAIN}" @@ -784,7 +771,7 @@ test_nuttx_esp32c6: - esp32c6 - usb_serial_jtag variables: - CHIP: esp32c6 + CHIP_NAME: esp32c6 TEST_BOARD: "esp32c6-builtin" TOOLCHAIN_PREFIX: "riscv32-esp" ESP_GDB_TOOLCHAIN: "${ESP_V5_1X_RISCV_GDB_TOOLCHAIN}" @@ -797,7 +784,7 @@ test_nuttx_esp32h2: - esp32h2 - usb_serial_jtag variables: - CHIP: esp32h2 + CHIP_NAME: esp32h2 TEST_BOARD: "esp32h2-builtin" TOOLCHAIN_PREFIX: "riscv32-esp" ESP_GDB_TOOLCHAIN: "${ESP_V5_1X_RISCV_GDB_TOOLCHAIN}" diff --git a/.gitlab/ci/util.yml b/.gitlab/ci/util.yml index 4d2af100a1..d940bcb218 100644 --- a/.gitlab/ci/util.yml +++ b/.gitlab/ci/util.yml @@ -31,7 +31,6 @@ tar -C ${TEST_RUN_DIR} -x -m -f ${DIST_ART_DIR}/${ARCHIVE_NAME} export DIST_DIR=${PWD}/${TEST_RUN_DIR}/${DIST_INSTALLED_DIR} export PYTHONPATH=$PWD/${TEST_RUN_DIR}:$PWD/testing/esp/py_debug_backend - . $PWD/${TEST_RUN_DIR}/gen_ut_app/gcov_data/gcov_env.sh echo "CHIP_TEST_TOOLCHAIN: ${CHIP_TEST_TOOLCHAIN}" 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}" @@ -46,15 +45,3 @@ .copy_nuttx_files: script: - *copy_nuttx_files_snippet - - -.run_tests_nuttx_snippet: &run_tests_nuttx_snippet | - ARCHIVE_NAME=$(cat ${DIST_ART_DIR}/dist_name_${PLATFORM_NAME}) - tar -C ${TEST_RUN_DIR} -x -f ${DIST_ART_DIR}/${ARCHIVE_NAME} - export DIST_DIR=${PWD}/${TEST_RUN_DIR}/${DIST_INSTALLED_DIR} - export PYTHONPATH=$PWD/${TEST_RUN_DIR}:$PWD/testing/esp/py_debug_backend - 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}" - -.run_tests_nuttx: - script: - - *run_tests_nuttx_snippet