diff --git a/.gitlab/ci/assign-test.yml b/.gitlab/ci/assign-test.yml index c5620ae0e6..3da76262d2 100644 --- a/.gitlab/ci/assign-test.yml +++ b/.gitlab/ci/assign-test.yml @@ -34,6 +34,9 @@ assign_example_test: - job: build_examples_cmake_esp32c6 artifacts: false optional: true + - job: build_examples_cmake_esp32h2 + artifacts: false + optional: true - job: build_examples_cmake_esp32s3 artifacts: false optional: true @@ -61,6 +64,9 @@ assign_custom_test: - job: build_test_apps_esp32c6 artifacts: false optional: true + - job: build_test_apps_esp32h2 + artifacts: false + optional: true - job: build_test_apps_esp32s3 artifacts: false optional: true @@ -83,6 +89,8 @@ assign_unit_test: optional: true - job: build_esp_idf_tests_cmake_esp32c6 optional: true + - job: build_esp_idf_tests_cmake_esp32h2 + optional: true - job: build_esp_idf_tests_cmake_esp32s3 optional: true variables: diff --git a/.gitlab/ci/default-build-test-rules.yml b/.gitlab/ci/default-build-test-rules.yml index 77f094f3b6..f3cbbd43ad 100644 --- a/.gitlab/ci/default-build-test-rules.yml +++ b/.gitlab/ci/default-build-test-rules.yml @@ -10,8 +10,8 @@ extra_default_build_targets: - esp32c6 - esp32h2 -bypass_check_test_targets: - - esp32h2 +# bypass_check_test_targets: +# - esp32h2 # - esp32c6 # # These lines would diff --git a/.gitlab/ci/rules.yml b/.gitlab/ci/rules.yml index e3e828b946..f2fbf384f5 100644 --- a/.gitlab/ci/rules.yml +++ b/.gitlab/ci/rules.yml @@ -2085,6 +2085,21 @@ - <<: *if-dev-push changes: *patterns-target_test-adc +.rules:test:component_ut-esp32h2: + rules: + - <<: *if-revert-branch + when: never + - <<: *if-protected + - <<: *if-label-build-only + when: never + - <<: *if-label-component_ut + - <<: *if-label-component_ut_esp32h2 + - <<: *if-label-target_test + - <<: *if-label-unit_test + - <<: *if-label-unit_test_esp32h2 + - <<: *if-dev-push + changes: *patterns-component_ut + .rules:test:component_ut-esp32h4-i154: rules: - <<: *if-revert-branch @@ -2271,6 +2286,19 @@ - <<: *if-dev-push changes: *patterns-custom_test +.rules:test:custom_test-esp32h2: + rules: + - <<: *if-revert-branch + when: never + - <<: *if-protected + - <<: *if-label-build-only + when: never + - <<: *if-label-custom_test + - <<: *if-label-custom_test_esp32h2 + - <<: *if-label-target_test + - <<: *if-dev-push + changes: *patterns-custom_test + .rules:test:custom_test-esp32s2: rules: - <<: *if-revert-branch @@ -2524,6 +2552,21 @@ - <<: *if-dev-push changes: *patterns-target_test-adc +.rules:test:example_test-esp32h2: + rules: + - <<: *if-revert-branch + when: never + - <<: *if-protected + - <<: *if-label-build-only + when: never + - <<: *if-label-example_test + - <<: *if-label-example_test_esp32h2 + - <<: *if-label-target_test + - <<: *if-dev-push + changes: *patterns-build-example_test + - <<: *if-dev-push + changes: *patterns-example_test + .rules:test:example_test-esp32s2: rules: - <<: *if-revert-branch @@ -2781,6 +2824,19 @@ - <<: *if-dev-push changes: *patterns-unit_test +.rules:test:unit_test-esp32h2: + rules: + - <<: *if-revert-branch + when: never + - <<: *if-protected + - <<: *if-label-build-only + when: never + - <<: *if-label-target_test + - <<: *if-label-unit_test + - <<: *if-label-unit_test_esp32h2 + - <<: *if-dev-push + changes: *patterns-unit_test + .rules:test:unit_test-esp32s2: rules: - <<: *if-revert-branch diff --git a/.gitlab/ci/target-test.yml b/.gitlab/ci/target-test.yml index 624879783b..58458a732a 100644 --- a/.gitlab/ci/target-test.yml +++ b/.gitlab/ci/target-test.yml @@ -157,6 +157,14 @@ example_test_pytest_esp32c6_generic: - build_pytest_examples_esp32c6 tags: [ esp32c6, generic ] +example_test_pytest_esp32h2_generic: + extends: + - .pytest_examples_dir_template + - .rules:test:example_test-esp32h2 + needs: + - build_pytest_examples_esp32h2 + tags: [ esp32h2, generic ] + example_test_pytest_esp32_ethernet_ota: extends: - .pytest_examples_dir_template @@ -775,6 +783,15 @@ component_ut_pytest_esp32c6_generic: tags: [ esp32c6, generic ] parallel: 2 +component_ut_pytest_esp32h2_generic: + extends: + - .pytest_components_dir_template + - .rules:test:component_ut-esp32h2 + needs: + - build_pytest_components_esp32h2 + tags: [ esp32h2, generic ] + parallel: 2 + component_ut_pytest_esp32c6_generic_multi_device: extends: - .pytest_components_dir_template @@ -887,6 +904,14 @@ test_app_test_pytest_esp32c6_generic: - build_pytest_test_apps_esp32c6 tags: [ esp32c6, generic ] +test_app_test_pytest_esp32h2_generic: + extends: + - .pytest_test_apps_dir_template + - .rules:test:custom_test-esp32h2 + needs: + - build_pytest_test_apps_esp32h2 + tags: [ esp32h2, generic ] + test_app_test_pytest_esp32s3_mspi_f8r8: extends: - .pytest_test_apps_dir_template @@ -995,6 +1020,11 @@ test_weekend_mqtt: - .example_test_template - .rules:test:example_test-esp32c6 +.example_test_esp32h2_template: + extends: + - .example_test_template + - .rules:test:example_test-esp32h2 + .example_test_esp32s3_template: extends: - .example_test_template @@ -1076,6 +1106,12 @@ example_test_C6_GENERIC: - ESP32C6 - Example_GENERIC +example_test_H2_GENERIC: + extends: .example_test_esp32h2_template + tags: + - ESP32H2 + - Example_GENERIC + .test_app_template: extends: .target_test_job_template needs: @@ -1110,6 +1146,11 @@ example_test_C6_GENERIC: - .test_app_template - .rules:test:custom_test-esp32c6 +.test_app_esp32h2_template: + extends: + - .test_app_template + - .rules:test:custom_test-esp32h2 + .test_app_esp32s3_template: extends: - .test_app_template @@ -1154,6 +1195,11 @@ example_test_C6_GENERIC: - .unit_test_template - .rules:test:unit_test-esp32c6 +.unit_test_esp32h2_template: + extends: + - .unit_test_template + - .rules:test:unit_test-esp32h2 + UT_001: extends: .unit_test_esp32_template parallel: 16 @@ -1303,6 +1349,13 @@ UT_C6: - ESP32C6_IDF - UT_T1_1 +UT_H2: + extends: .unit_test_esp32h2_template + parallel: 5 + tags: + - ESP32H2_IDF + - UT_T1_1 + UT_S3: extends: .unit_test_esp32s3_template parallel: 9 diff --git a/components/app_update/test_apps/pytest_app_update_ut.py b/components/app_update/test_apps/pytest_app_update_ut.py index 286994813f..594bdbf2f3 100644 --- a/components/app_update/test_apps/pytest_app_update_ut.py +++ b/components/app_update/test_apps/pytest_app_update_ut.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 import re @@ -19,7 +19,7 @@ def run_multiple_stages(dut: Dut, test_case_num: int, stages: int) -> None: @pytest.mark.supported_targets -@pytest.mark.temp_skip_ci(targets=['esp32c6'], reason='c6 support TBD') +@pytest.mark.temp_skip_ci(targets=['esp32c6', 'esp32h2'], reason='c6/h2 support TBD') @pytest.mark.generic def test_app_update(dut: Dut) -> None: extra_data = dut.parse_test_menu() diff --git a/components/driver/.build-test-rules.yml b/components/driver/.build-test-rules.yml index 92ea5c9780..90fc9794c3 100644 --- a/components/driver/.build-test-rules.yml +++ b/components/driver/.build-test-rules.yml @@ -16,6 +16,13 @@ components/driver/test_apps/i2s_test_apps: disable: - if: SOC_I2S_SUPPORTED != 1 +components/driver/test_apps/i2s_test_apps/i2s: + disable: + - if: SOC_I2S_SUPPORTED != 1 + disable_test: + - if: IDF_TARGET in ["esp32h2"] + temporary: true + reason: Cannot pass test, see IDF-6811 components/driver/test_apps/i2s_test_apps/i2s_tdm: disable: - if: SOC_I2S_SUPPORTS_TDM != 1 @@ -27,6 +34,10 @@ components/driver/test_apps/i2s_test_apps/legacy_i2s_adc_dac: components/driver/test_apps/i2s_test_apps/legacy_i2s_driver: disable: - if: SOC_I2S_SUPPORTED != 1 + disable_test: + - if: IDF_TARGET in ["esp32h2"] + temporary: true + reason: cannot pass test IDF-6811 components/driver/test_apps/ledc: disable: @@ -39,10 +50,18 @@ components/driver/test_apps/legacy_adc_driver: components/driver/test_apps/legacy_mcpwm_driver: disable: - if: SOC_MCPWM_SUPPORTED != 1 + disable_test: + - if: IDF_TARGET in ["esp32h2"] + temporary: true + reason: cannot pass test, IDF-6812 components/driver/test_apps/legacy_pcnt_driver: disable: - if: SOC_PCNT_SUPPORTED != 1 + disable_test: + - if: IDF_TARGET in ["esp32h2"] + temporary: true + reason: cannot pass test IDF-6814 components/driver/test_apps/legacy_rmt_driver: disable: @@ -59,6 +78,10 @@ components/driver/test_apps/legacy_timer_driver: components/driver/test_apps/mcpwm: disable: - if: SOC_MCPWM_SUPPORTED != 1 + disable_test: + - if: IDF_TARGET in ["esp32h2"] + temporary: true + reason: cannot pass test, IDF-6812 components/driver/test_apps/pulse_cnt: disable: @@ -67,6 +90,10 @@ components/driver/test_apps/pulse_cnt: components/driver/test_apps/rmt: disable: - if: SOC_RMT_SUPPORTED != 1 + disable_test: + - if: IDF_TARGET in ["esp32h2"] + temporary: true + reason: cannot pass test, IDF-6810 components/driver/test_apps/rs485: disable_test: diff --git a/components/driver/test_apps/gpio/main/test_gpio.c b/components/driver/test_apps/gpio/main/test_gpio.c index ede7e2e527..47ad6bf12b 100644 --- a/components/driver/test_apps/gpio/main/test_gpio.c +++ b/components/driver/test_apps/gpio/main/test_gpio.c @@ -791,6 +791,7 @@ TEST_CASE("GPIO_drive_capability_test", "[gpio][ignore]") prompt_to_continue("If this test finishes"); } +#if !CONFIG_IDF_TARGET_ESP32H2 // IDF-6845 #if SOC_USB_SERIAL_JTAG_SUPPORTED TEST_CASE("GPIO_input_and_output_of_USB_pins_test", "[gpio]") { @@ -843,6 +844,7 @@ TEST_CASE("GPIO_USB_DP_pin_pullup_disable_test", "[gpio]") TEST_ASSERT_EQUAL_INT(0, gpio_get_level(USB_DP_GPIO_NUM)); } #endif //SOC_USB_SERIAL_JTAG_SUPPORTED +#endif #if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32H2) // TODO: IDF-6267 Remove when light sleep is supported // Ignored in CI because it needs manually connect TEST_GPIO_INPUT_LEVEL_LOW_PIN to 3.3v to wake up from light sleep diff --git a/components/driver/test_apps/i2s_test_apps/i2s/main/test_i2s_iram.c b/components/driver/test_apps/i2s_test_apps/i2s/main/test_i2s_iram.c index 792be79a76..518dcf4b87 100644 --- a/components/driver/test_apps/i2s_test_apps/i2s/main/test_i2s_iram.c +++ b/components/driver/test_apps/i2s_test_apps/i2s/main/test_i2s_iram.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/driver/test_apps/i2s_test_apps/i2s/pytest_i2s.py b/components/driver/test_apps/i2s_test_apps/i2s/pytest_i2s.py index 8920052d55..78fbdb8a80 100644 --- a/components/driver/test_apps/i2s_test_apps/i2s/pytest_i2s.py +++ b/components/driver/test_apps/i2s_test_apps/i2s/pytest_i2s.py @@ -10,7 +10,7 @@ from pytest_embedded import Dut @pytest.mark.esp32c3 @pytest.mark.esp32c6 @pytest.mark.esp32s3 -@pytest.mark.esp32h2 +# @pytest.mark.esp32h2 IDF-6811 @pytest.mark.generic @pytest.mark.parametrize( 'config', diff --git a/components/driver/test_apps/i2s_test_apps/legacy_i2s_driver/pytest_legacy_i2s.py b/components/driver/test_apps/i2s_test_apps/legacy_i2s_driver/pytest_legacy_i2s.py index 0efdd44a40..de433a2214 100644 --- a/components/driver/test_apps/i2s_test_apps/legacy_i2s_driver/pytest_legacy_i2s.py +++ b/components/driver/test_apps/i2s_test_apps/legacy_i2s_driver/pytest_legacy_i2s.py @@ -10,7 +10,7 @@ from pytest_embedded import Dut @pytest.mark.esp32c3 @pytest.mark.esp32s3 @pytest.mark.esp32c6 -@pytest.mark.esp32h2 +# @pytest.mark.esp32h2 IDF-6811 @pytest.mark.generic @pytest.mark.parametrize( 'config', diff --git a/components/driver/test_apps/ledc/main/test_ledc.c b/components/driver/test_apps/ledc/main/test_ledc.c index a4893d280d..7c473df601 100644 --- a/components/driver/test_apps/ledc/main/test_ledc.c +++ b/components/driver/test_apps/ledc/main/test_ledc.c @@ -443,6 +443,7 @@ static void frequency_set_get(ledc_mode_t speed_mode, ledc_timer_t timer, uint32 { int real_freq; TEST_ESP_OK(ledc_set_freq(speed_mode, timer, desired_freq)); + vTaskDelay(10 / portTICK_PERIOD_MS); real_freq = wave_count(1000); TEST_ASSERT_INT16_WITHIN(error, theoretical_freq, real_freq); TEST_ASSERT_EQUAL_INT32(theoretical_freq, ledc_get_freq(speed_mode, timer)); diff --git a/components/driver/test_apps/legacy_mcpwm_driver/pytest_legacy_mcpwm.py b/components/driver/test_apps/legacy_mcpwm_driver/pytest_legacy_mcpwm.py index a5a72ebff6..26a23016a7 100644 --- a/components/driver/test_apps/legacy_mcpwm_driver/pytest_legacy_mcpwm.py +++ b/components/driver/test_apps/legacy_mcpwm_driver/pytest_legacy_mcpwm.py @@ -8,7 +8,7 @@ from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32s3 @pytest.mark.esp32c6 -@pytest.mark.esp32h2 +# @pytest.mark.esp32h2 IDF-6812 @pytest.mark.generic @pytest.mark.parametrize( 'config', diff --git a/components/driver/test_apps/legacy_pcnt_driver/pytest_legacy_pcnt.py b/components/driver/test_apps/legacy_pcnt_driver/pytest_legacy_pcnt.py index c8a3555864..a1d99e0bfe 100644 --- a/components/driver/test_apps/legacy_pcnt_driver/pytest_legacy_pcnt.py +++ b/components/driver/test_apps/legacy_pcnt_driver/pytest_legacy_pcnt.py @@ -9,7 +9,7 @@ from pytest_embedded import Dut @pytest.mark.esp32s2 @pytest.mark.esp32s3 @pytest.mark.esp32c6 -@pytest.mark.esp32h2 +# @pytest.mark.esp32h2 IDF-6814 @pytest.mark.generic @pytest.mark.parametrize( 'config', diff --git a/components/driver/test_apps/mcpwm/pytest_mcpwm.py b/components/driver/test_apps/mcpwm/pytest_mcpwm.py index e658c90ba1..b3cc185a27 100644 --- a/components/driver/test_apps/mcpwm/pytest_mcpwm.py +++ b/components/driver/test_apps/mcpwm/pytest_mcpwm.py @@ -8,7 +8,7 @@ from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32s3 @pytest.mark.esp32c6 -@pytest.mark.esp32h2 +# @pytest.mark.esp32h2 # IDF-6812 @pytest.mark.generic @pytest.mark.parametrize( 'config', diff --git a/components/driver/test_apps/rmt/pytest_rmt.py b/components/driver/test_apps/rmt/pytest_rmt.py index 2170d5c9da..baef51f509 100644 --- a/components/driver/test_apps/rmt/pytest_rmt.py +++ b/components/driver/test_apps/rmt/pytest_rmt.py @@ -10,7 +10,7 @@ from pytest_embedded import Dut @pytest.mark.esp32s3 @pytest.mark.esp32c3 @pytest.mark.esp32c6 -@pytest.mark.esp32h2 +# @pytest.mark.esp32h2 IDF-6810 @pytest.mark.generic @pytest.mark.parametrize( 'config', diff --git a/components/efuse/.build-test-rules.yml b/components/efuse/.build-test-rules.yml index 498c17a761..15f8e3233d 100644 --- a/components/efuse/.build-test-rules.yml +++ b/components/efuse/.build-test-rules.yml @@ -2,6 +2,6 @@ components/efuse/test_apps: disable_test: - - if: IDF_TARGET in ["esp32s2", "esp32s3"] + - if: IDF_TARGET in ["esp32s2", "esp32s3", "esp32h2"] temporary: true - reason: eFuse for S2 and S3 is similar to the C3 chip, so we only test for C3. + reason: eFuse for S2 and S3 is similar to the C3 chip, so we only test for C3. H2 fails IDF-6897 diff --git a/components/efuse/test_apps/pytest_efuse.py b/components/efuse/test_apps/pytest_efuse.py index 692452b4d0..02211ea97a 100644 --- a/components/efuse/test_apps/pytest_efuse.py +++ b/components/efuse/test_apps/pytest_efuse.py @@ -11,7 +11,7 @@ from pytest_embedded import Dut @pytest.mark.esp32c2 @pytest.mark.esp32c3 @pytest.mark.esp32c6 -@pytest.mark.esp32h2 +# @pytest.mark.esp32h2 IDF-6897 @pytest.mark.generic def test_efuse(dut: Dut) -> None: dut.run_all_single_board_cases() diff --git a/components/esp_hw_support/.build-test-rules.yml b/components/esp_hw_support/.build-test-rules.yml index 4bfe3dec9c..3744eea694 100644 --- a/components/esp_hw_support/.build-test-rules.yml +++ b/components/esp_hw_support/.build-test-rules.yml @@ -20,6 +20,11 @@ components/esp_hw_support/test_apps/rtc_clk: temporary: true reason: Unsupported on C6 for now. TODO IDF-5645 +components/esp_hw_support/test_apps/security_support/esp_hw_support_unity_tests: + disable_test: + - if: IDF_TARGET in ["esp32h2"] + temporary: true + reason: H2 fails IDF-6898 components/heap/host_test/host_test_linux: enable: - if: IDF_TARGET == "linux" diff --git a/components/esp_hw_support/test_apps/esp_hw_support_unity_tests/pytest_esp_hw_support.py b/components/esp_hw_support/test_apps/esp_hw_support_unity_tests/pytest_esp_hw_support.py index 94ddf934ec..b486891bdf 100644 --- a/components/esp_hw_support/test_apps/esp_hw_support_unity_tests/pytest_esp_hw_support.py +++ b/components/esp_hw_support/test_apps/esp_hw_support_unity_tests/pytest_esp_hw_support.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import pytest diff --git a/components/esp_hw_support/test_apps/rtc_clk/pytest_rtc_clk.py b/components/esp_hw_support/test_apps/rtc_clk/pytest_rtc_clk.py index bc61e04a80..20eb2e85f2 100644 --- a/components/esp_hw_support/test_apps/rtc_clk/pytest_rtc_clk.py +++ b/components/esp_hw_support/test_apps/rtc_clk/pytest_rtc_clk.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 from typing import Any @@ -33,6 +33,6 @@ def test_rtc_no_xtal32k(dut: Dut) -> None: @pytest.mark.generic @pytest.mark.supported_targets -@pytest.mark.temp_skip_ci(targets=['esp32c6'], reason='c6 support TBD') +@pytest.mark.temp_skip_ci(targets=['esp32c6', 'esp32h2'], reason='c6/h2 support TBD') def test_rtc_calib(case_tester: Any) -> None: case_tester.run_all_multi_stage_cases() diff --git a/components/esp_hw_support/test_apps/security_support/esp_hw_support_unity_tests/pytest_security_support.py b/components/esp_hw_support/test_apps/security_support/esp_hw_support_unity_tests/pytest_security_support.py index f044640c38..f28e7db43b 100644 --- a/components/esp_hw_support/test_apps/security_support/esp_hw_support_unity_tests/pytest_security_support.py +++ b/components/esp_hw_support/test_apps/security_support/esp_hw_support_unity_tests/pytest_security_support.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import pytest @@ -9,8 +9,8 @@ from pytest_embedded import Dut @pytest.mark.parametrize( 'config', [ - pytest.param('default', marks=[pytest.mark.supported_targets]), - pytest.param('release', marks=[pytest.mark.supported_targets]), + pytest.param('default', marks=[pytest.mark.supported_targets, pytest.mark.temp_skip_ci(targets=['esp32h2'], reason='test failed IDF-6898')]), + pytest.param('release', marks=[pytest.mark.supported_targets, pytest.mark.temp_skip_ci(targets=['esp32h2'], reason='test failed IDF-6898')]), ], indirect=True, ) diff --git a/components/esp_pm/test_apps/esp_pm/pytest_esp_pm.py b/components/esp_pm/test_apps/esp_pm/pytest_esp_pm.py index 43e40cef55..be36be83a4 100644 --- a/components/esp_pm/test_apps/esp_pm/pytest_esp_pm.py +++ b/components/esp_pm/test_apps/esp_pm/pytest_esp_pm.py @@ -5,9 +5,9 @@ import pytest from pytest_embedded import Dut CONFIGS = [ - pytest.param('default', marks=[pytest.mark.supported_targets, pytest.mark.temp_skip_ci(targets=['esp32c6'], reason='c6 support TBD')]), - pytest.param('limits', marks=[pytest.mark.supported_targets, pytest.mark.temp_skip_ci(targets=['esp32c6'], reason='c6 support TBD')]), - pytest.param('options', marks=[pytest.mark.supported_targets, pytest.mark.temp_skip_ci(targets=['esp32c6'], reason='c6 support TBD')]), + pytest.param('default', marks=[pytest.mark.supported_targets, pytest.mark.temp_skip_ci(targets=['esp32c6', 'esp32h2'], reason='c6/h2 support TBD')]), + pytest.param('limits', marks=[pytest.mark.supported_targets, pytest.mark.temp_skip_ci(targets=['esp32c6', 'esp32h2'], reason='c6/h2 support TBD')]), + pytest.param('options', marks=[pytest.mark.supported_targets, pytest.mark.temp_skip_ci(targets=['esp32c6', 'esp32h2'], reason='c6/h2 support TBD')]), ] diff --git a/components/esp_system/Kconfig b/components/esp_system/Kconfig index 074b4c5f37..7e31e667ba 100644 --- a/components/esp_system/Kconfig +++ b/components/esp_system/Kconfig @@ -101,7 +101,7 @@ menu "ESP System Settings" default y if IDF_TARGET_ESP32S3 default y if IDF_TARGET_ESP32H4 default y if IDF_TARGET_ESP32C6 - default y if IDF_TARGET_ESP32H2 + default n if IDF_TARGET_ESP32H2 # IDF-5667 & IDF-6847 depends on !IDF_TARGET_ESP32C2 config ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP diff --git a/components/esp_system/test/test_delay.c b/components/esp_system/test/test_delay.c index 55ed27f5a2..da5f625f31 100644 --- a/components/esp_system/test/test_delay.c +++ b/components/esp_system/test/test_delay.c @@ -38,6 +38,7 @@ static void test_delay_task(void *p) vTaskDelete(NULL); } +#if !CONFIG_IDF_TARGET_ESP32H2 // IDF-6783 TEST_CASE("esp_rom_delay_us produces correct delay on CPUs", "[delay]") { int delay_ms = 50; @@ -60,6 +61,7 @@ TEST_CASE("esp_rom_delay_us produces correct delay on CPUs", "[delay]") ref_clock_deinit(); vSemaphoreDelete(args.done); } +#endif TEST_CASE("vTaskDelay produces correct delay on CPUs", "[delay]") { diff --git a/components/esp_system/test/test_reset_reason.c b/components/esp_system/test/test_reset_reason.c index 4f0333a3bc..150097c3a4 100644 --- a/components/esp_system/test/test_reset_reason.c +++ b/components/esp_system/test/test_reset_reason.c @@ -70,7 +70,7 @@ TEST_CASE("reset reason ESP_RST_POWERON", "[reset][ignore]") } -#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2, ESP32H2) //IDF-5059 static __NOINIT_ATTR uint32_t s_noinit_val; static RTC_NOINIT_ATTR uint32_t s_rtc_noinit_val; diff --git a/components/esp_timer/test_apps/pytest_esp_timer_ut.py b/components/esp_timer/test_apps/pytest_esp_timer_ut.py index 9a69efa9e1..4b20f09436 100644 --- a/components/esp_timer/test_apps/pytest_esp_timer_ut.py +++ b/components/esp_timer/test_apps/pytest_esp_timer_ut.py @@ -5,8 +5,8 @@ import pytest from pytest_embedded import Dut CONFIGS = [ - pytest.param('general', marks=[pytest.mark.supported_targets]), - pytest.param('release', marks=[pytest.mark.supported_targets]), + pytest.param('general', marks=[pytest.mark.supported_targets, pytest.mark.temp_skip_ci(targets=['esp32h2'], reason='h2 support TBD')]), + pytest.param('release', marks=[pytest.mark.supported_targets, pytest.mark.temp_skip_ci(targets=['esp32h2'], reason='h2 support TBD')]), pytest.param('single_core', marks=[pytest.mark.esp32]), pytest.param('freertos_compliance', marks=[pytest.mark.esp32]), pytest.param('isr_dispatch_esp32', marks=[pytest.mark.esp32]), diff --git a/components/esp_wifi/test_apps/wifi_function/pytest_wifi_function.py b/components/esp_wifi/test_apps/wifi_function/pytest_wifi_function.py index 843b6dfce7..732ef415f1 100644 --- a/components/esp_wifi/test_apps/wifi_function/pytest_wifi_function.py +++ b/components/esp_wifi/test_apps/wifi_function/pytest_wifi_function.py @@ -5,8 +5,12 @@ import pytest from pytest_embedded import Dut -@pytest.mark.supported_targets -@pytest.mark.temp_skip_ci(targets=['esp32c2'], reason='esp32c2 are using xtal_26mhz') +@pytest.mark.esp32 +@pytest.mark.esp32c3 +@pytest.mark.esp32s2 +@pytest.mark.esp32s3 +@pytest.mark.esp32c6 +# @pytest.mark.esp32c2 # esp32c2 are using xtal_26mhz @pytest.mark.generic def test_wifi_unit_test(dut: Dut) -> None: dut.expect_exact('Press ENTER to see the list of tests') diff --git a/components/freertos/test_apps/freertos/pytest_freertos.py b/components/freertos/test_apps/freertos/pytest_freertos.py index 2847089950..8892d1a366 100644 --- a/components/freertos/test_apps/freertos/pytest_freertos.py +++ b/components/freertos/test_apps/freertos/pytest_freertos.py @@ -5,12 +5,12 @@ import pytest from pytest_embedded import Dut CONFIGS = [ - pytest.param('default', marks=[pytest.mark.supported_targets]), - pytest.param('freertos_options', marks=[pytest.mark.supported_targets]), + pytest.param('default', marks=[pytest.mark.supported_targets, pytest.mark.temp_skip_ci(targets=['esp32h2'], reason='test failed')]), + pytest.param('freertos_options', marks=[pytest.mark.supported_targets, pytest.mark.temp_skip_ci(targets=['esp32h2'], reason='test failed')]), pytest.param('psram', marks=[pytest.mark.esp32]), pytest.param('release', marks=[pytest.mark.supported_targets]), pytest.param('single_core', marks=[pytest.mark.esp32]), - pytest.param('smp', marks=[pytest.mark.supported_targets]), + pytest.param('smp', marks=[pytest.mark.supported_targets, pytest.mark.temp_skip_ci(targets=['esp32h2'], reason='test failed')]), ] diff --git a/components/heap/test_apps/pytest_heap.py b/components/heap/test_apps/pytest_heap.py index 26405d6cfc..32f48b0ac8 100644 --- a/components/heap/test_apps/pytest_heap.py +++ b/components/heap/test_apps/pytest_heap.py @@ -7,6 +7,7 @@ from pytest_embedded import Dut @pytest.mark.generic @pytest.mark.supported_targets +@pytest.mark.temp_skip_ci(targets=['esp32h2'], reason='test failed, IDF-6880') @pytest.mark.parametrize( 'config', [ diff --git a/components/mbedtls/test_apps/main/test_esp_crt_bundle.c b/components/mbedtls/test_apps/main/test_esp_crt_bundle.c index a4b0af46a5..8eb34f2b0e 100644 --- a/components/mbedtls/test_apps/main/test_esp_crt_bundle.c +++ b/components/mbedtls/test_apps/main/test_esp_crt_bundle.c @@ -35,6 +35,8 @@ #define SERVER_ADDRESS "localhost" #define SERVER_PORT "4433" +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32H2) // IDF-6847 + extern const uint8_t server_cert_chain_pem_start[] asm("_binary_server_cert_chain_pem_start"); extern const uint8_t server_cert_chain_pem_end[] asm("_binary_server_cert_chain_pem_end"); @@ -485,3 +487,5 @@ TEST_CASE("custom certificate bundle init API - bound checking", "[mbedtls]") esp_crt_bundle_detach(NULL); } + +#endif // !TEMPORARY_DISABLED_FOR_TARGETS(ESP32H2) diff --git a/components/newlib/test/test_time.c b/components/newlib/test/test_time.c index 84e63255e4..e4f8f5879f 100644 --- a/components/newlib/test/test_time.c +++ b/components/newlib/test/test_time.c @@ -41,6 +41,8 @@ #include "esp32c2/rtc.h" #elif CONFIG_IDF_TARGET_ESP32C6 #include "esp32c6/rtc.h" +#elif CONFIG_IDF_TARGET_ESP32H2 +#include "esp32h2/rtc.h" #endif #if portNUM_PROCESSORS == 2 diff --git a/components/spi_flash/test_apps/flash_mmap/pytest_flash_mmap.py b/components/spi_flash/test_apps/flash_mmap/pytest_flash_mmap.py index 8695e2841b..94e8364213 100644 --- a/components/spi_flash/test_apps/flash_mmap/pytest_flash_mmap.py +++ b/components/spi_flash/test_apps/flash_mmap/pytest_flash_mmap.py @@ -6,7 +6,7 @@ from pytest_embedded import Dut @pytest.mark.supported_targets -@pytest.mark.temp_skip_ci(targets=['esp32c6'], reason='c6 support TBD') +@pytest.mark.temp_skip_ci(targets=['esp32c6', 'esp32h2'], reason='c6/h2 support TBD') @pytest.mark.generic @pytest.mark.parametrize( 'config', diff --git a/components/vfs/test/test_vfs_select.c b/components/vfs/test/test_vfs_select.c index 8568f2c284..3dbc33dbf1 100644 --- a/components/vfs/test/test_vfs_select.c +++ b/components/vfs/test/test_vfs_select.c @@ -141,6 +141,7 @@ static void deinit(int uart_fd, int socket_fd) close(socket_fd); } +#if !CONFIG_IDF_TARGET_ESP32H2 // IDF-6782 TEST_CASE("UART can do select()", "[vfs]") { int uart_fd; @@ -258,6 +259,7 @@ TEST_CASE("UART can do poll()", "[vfs]") deinit(uart_fd, socket_fd); } +#endif TEST_CASE("socket can do select()", "[vfs]") { @@ -442,6 +444,7 @@ static void inline start_select_task(test_select_task_param_t *param) xTaskCreate(select_task, "select_task", 4*1024, (void *) param, 5, NULL); } +#if !CONFIG_IDF_TARGET_ESP32H2 // IDF-6782 TEST_CASE("concurrent selects work", "[vfs]") { int uart_fd, socket_fd; @@ -543,6 +546,7 @@ TEST_CASE("concurrent selects work", "[vfs]") deinit(uart_fd, socket_fd); close(dummy_socket_fd); } +#endif TEST_CASE("select() works with concurrent mount", "[vfs][fatfs]") { diff --git a/components/vfs/test/test_vfs_uart.c b/components/vfs/test/test_vfs_uart.c index 9d64115b2a..a9007f8687 100644 --- a/components/vfs/test/test_vfs_uart.c +++ b/components/vfs/test/test_vfs_uart.c @@ -23,6 +23,7 @@ #include "test_utils.h" #include "sdkconfig.h" +#if !CONFIG_IDF_TARGET_ESP32H2 // IDF-6782 static void fwrite_str_loopback(const char* str, size_t size) { esp_rom_uart_tx_wait_idle(CONFIG_ESP_CONSOLE_UART_NUM); @@ -124,6 +125,7 @@ TEST_CASE("CRs are removed from the stdin correctly", "[vfs]") TEST_ASSERT_EQUAL(2, rb); TEST_ASSERT_EQUAL_UINT8_ARRAY("4\n", dst, 2); } +#endif struct read_task_arg_t { char* out_buffer; @@ -137,6 +139,7 @@ struct write_task_arg_t { SemaphoreHandle_t done; }; +#if !CONFIG_IDF_TARGET_ESP32H2 // IDF-6782 static void read_task_fn(void* varg) { struct read_task_arg_t* parg = (struct read_task_arg_t*) varg; @@ -196,6 +199,7 @@ TEST_CASE("can write to UART while another task is reading", "[vfs]") vSemaphoreDelete(read_arg.done); vSemaphoreDelete(write_arg.done); } +#endif TEST_CASE("fcntl supported in UART VFS", "[vfs]") { @@ -208,6 +212,7 @@ TEST_CASE("fcntl supported in UART VFS", "[vfs]") TEST_ASSERT_NOT_EQUAL(-1, res); } +#if !CONFIG_IDF_TARGET_ESP32H2 // IDF-6782 #ifdef CONFIG_VFS_SUPPORT_TERMIOS TEST_CASE("Can use termios for UART", "[vfs]") { @@ -348,3 +353,4 @@ TEST_CASE("Can use termios for UART", "[vfs]") uart_driver_delete(UART_NUM_1); } #endif // CONFIG_VFS_SUPPORT_TERMIOS +#endif diff --git a/components/wpa_supplicant/test/test_sae.c b/components/wpa_supplicant/test/test_sae.c index f0af4c602e..90e95e2326 100644 --- a/components/wpa_supplicant/test/test_sae.c +++ b/components/wpa_supplicant/test/test_sae.c @@ -19,7 +19,7 @@ #include "../src/common/sae.h" #include "utils/wpabuf.h" #include "test_utils.h" - +#if !CONFIG_IDF_TARGET_ESP32H2 // IDF-6781 typedef struct crypto_bignum crypto_bignum; @@ -259,4 +259,5 @@ TEST_CASE("Test SAE functionality with ECC group", "[wpa3_sae]") ESP_LOGI("SAE Test", "=========== Complete ============"); } +#endif #endif /* CONFIG_WPA3_SAE */ diff --git a/examples/peripherals/.build-test-rules.yml b/examples/peripherals/.build-test-rules.yml index 88cd734c35..cc004ec9d8 100644 --- a/examples/peripherals/.build-test-rules.yml +++ b/examples/peripherals/.build-test-rules.yml @@ -41,6 +41,9 @@ examples/peripherals/i2s/i2s_adc_dac: examples/peripherals/i2s/i2s_basic/i2s_pdm: disable: - if: SOC_I2S_SUPPORTS_PDM != 1 + - if: IDF_TARGET == "esp32h2" + temporary: true + reason: rtc timer is not supported examples/peripherals/i2s/i2s_basic/i2s_std: disable: @@ -54,6 +57,10 @@ examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm: disable: - if: SOC_I2S_SUPPORTS_TDM != 1 or (SOC_I2C_SUPPORTED != 1 or SOC_GPSPI_SUPPORTED != 1) reason: rely on I2S TDM mode to receive audio, I2C to config es7210 and SPI to save audio to SD card + disable_test: + - if: IDF_TARGET in ["esp32h2"] + temporary: true + reason: cannot pass target test IDF-6811 examples/peripherals/i2s/i2s_codec/i2s_es8311: disable: @@ -135,6 +142,9 @@ examples/peripherals/rmt/onewire_ds18b20: examples/peripherals/rmt/stepper_motor: disable: - if: SOC_RMT_SUPPORT_TX_LOOP_AUTO_STOP != 1 + - if: IDF_TARGET == "esp32h2" + temporary: true + reason: wrong GPIO on esp32h2 examples/peripherals/sdio/host: enable: @@ -203,6 +213,12 @@ examples/peripherals/timer_group: disable: - if: SOC_GPTIMER_SUPPORTED != 1 +examples/peripherals/timer_group/gptimer: + disable_test: + - if: IDF_TARGET in ["esp32h2"] + temporary: true + reason: cannot pass target test IDF-6846 + examples/peripherals/timer_group/gptimer_capture_hc_sr04: disable: - if: SOC_TIMER_SUPPORT_ETM != 1 diff --git a/examples/peripherals/i2s/i2s_basic/i2s_pdm/README.md b/examples/peripherals/i2s/i2s_basic/i2s_pdm/README.md index 1c951cdeb9..897dbcab0e 100644 --- a/examples/peripherals/i2s/i2s_basic/i2s_pdm/README.md +++ b/examples/peripherals/i2s/i2s_basic/i2s_pdm/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | # I2S Basic PDM Mode Example diff --git a/examples/peripherals/i2s/i2s_basic/i2s_pdm/pytest_i2s_pdm.py b/examples/peripherals/i2s/i2s_basic/i2s_pdm/pytest_i2s_pdm.py index 561ee109dd..29b3de13fb 100644 --- a/examples/peripherals/i2s/i2s_basic/i2s_pdm/pytest_i2s_pdm.py +++ b/examples/peripherals/i2s/i2s_basic/i2s_pdm/pytest_i2s_pdm.py @@ -9,7 +9,7 @@ from pytest_embedded import Dut @pytest.mark.esp32s3 @pytest.mark.esp32c3 @pytest.mark.esp32c6 -@pytest.mark.esp32h2 +# @pytest.mark.esp32h2 IDF-6808 @pytest.mark.generic @pytest.mark.parametrize( 'config', diff --git a/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/pytest_i2s_es7210_tdm.py b/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/pytest_i2s_es7210_tdm.py index 618c700bfd..33f7b29901 100644 --- a/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/pytest_i2s_es7210_tdm.py +++ b/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/pytest_i2s_es7210_tdm.py @@ -7,7 +7,7 @@ from pytest_embedded import Dut @pytest.mark.esp32s3 @pytest.mark.esp32c3 @pytest.mark.esp32c6 -@pytest.mark.esp32h2 +# @pytest.mark.esp32h2 IDF-6264 @pytest.mark.generic def test_i2s_es7210_tdm_example(dut: Dut) -> None: dut.expect_exact('example: Create I2S receive channel') diff --git a/examples/peripherals/rmt/stepper_motor/README.md b/examples/peripherals/rmt/stepper_motor/README.md index 772a888393..6bb29a2579 100644 --- a/examples/peripherals/rmt/stepper_motor/README.md +++ b/examples/peripherals/rmt/stepper_motor/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32-C6 | ESP32-H2 | ESP32-S3 | -| ----------------- | -------- | -------- | -------- | +| Supported Targets | ESP32-C6 | ESP32-S3 | +| ----------------- | -------- | -------- | # RMT Based Stepper Motor Smooth Controller diff --git a/examples/peripherals/rmt/stepper_motor/pytest_stepper_motor.py b/examples/peripherals/rmt/stepper_motor/pytest_stepper_motor.py index f2fba2b8ce..1219604706 100644 --- a/examples/peripherals/rmt/stepper_motor/pytest_stepper_motor.py +++ b/examples/peripherals/rmt/stepper_motor/pytest_stepper_motor.py @@ -7,7 +7,7 @@ from pytest_embedded import Dut @pytest.mark.esp32s3 @pytest.mark.esp32c6 -@pytest.mark.esp32h2 +# @pytest.mark.esp32h2 IDF-6808 @pytest.mark.generic def test_stepper_motor_example(dut: Dut) -> None: dut.expect_exact('example: Initialize EN + DIR GPIO') diff --git a/examples/peripherals/timer_group/gptimer/pytest_gptimer_example.py b/examples/peripherals/timer_group/gptimer/pytest_gptimer_example.py index 309beee822..b6d5ef7dc9 100644 --- a/examples/peripherals/timer_group/gptimer/pytest_gptimer_example.py +++ b/examples/peripherals/timer_group/gptimer/pytest_gptimer_example.py @@ -6,6 +6,7 @@ from pytest_embedded import Dut @pytest.mark.supported_targets +@pytest.mark.temp_skip_ci(targets=['esp32h2'], reason='test failed') # IDF-6846 @pytest.mark.generic def test_gptimer_example(dut: Dut) -> None: dut.expect_exact('Create timer handle', timeout=5) diff --git a/examples/system/.build-test-rules.yml b/examples/system/.build-test-rules.yml index d067245b51..4eeb72d496 100644 --- a/examples/system/.build-test-rules.yml +++ b/examples/system/.build-test-rules.yml @@ -10,6 +10,12 @@ examples/system/app_trace_to_host: temporary: true reason: lack of runners +examples/system/base_mac_address: + disable_test: + - if: IDF_TARGET in ["esp32h2"] + temporary: true + reason: cannot pass, IDF-6809 + examples/system/console/advanced: disable: - if: IDF_TARGET in ["esp32c2", "esp32c6", "esp32h2"] diff --git a/examples/system/base_mac_address/pytest_base_mac_address.py b/examples/system/base_mac_address/pytest_base_mac_address.py index eae94035b6..de6373b066 100644 --- a/examples/system/base_mac_address/pytest_base_mac_address.py +++ b/examples/system/base_mac_address/pytest_base_mac_address.py @@ -6,6 +6,7 @@ from pytest_embedded import Dut @pytest.mark.supported_targets +@pytest.mark.temp_skip_ci(targets=['esp32h2'], reason='cannot pass') # IDF-6809 @pytest.mark.generic def test_base_mac_address(dut: Dut) -> None: dut.expect_exact('BASE_MAC: Base MAC Address read from EFUSE BLK0') diff --git a/examples/system/esp_timer/pytest_esp_timer.py b/examples/system/esp_timer/pytest_esp_timer.py index f9168ceb58..74e5fe5e41 100644 --- a/examples/system/esp_timer/pytest_esp_timer.py +++ b/examples/system/esp_timer/pytest_esp_timer.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import logging @@ -29,7 +29,7 @@ ONE_SHOT_TIMER_PERIOD = 5000000 @pytest.mark.supported_targets -@pytest.mark.temp_skip_ci(targets=['esp32c6'], reason='c6 support TBD') +@pytest.mark.temp_skip_ci(targets=['esp32c6', 'esp32h2'], reason='c6/h2 support TBD') @pytest.mark.generic @pytest.mark.parametrize( 'config', diff --git a/examples/system/ota/native_ota_example/pytest_native_ota.py b/examples/system/ota/native_ota_example/pytest_native_ota.py index 169173934a..5559d8d1fe 100644 --- a/examples/system/ota/native_ota_example/pytest_native_ota.py +++ b/examples/system/ota/native_ota_example/pytest_native_ota.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 import http.server import multiprocessing @@ -121,8 +121,11 @@ def start_chunked_server(ota_image_dir: str, server_port: int) -> subprocess.Pop return chunked_server -@pytest.mark.supported_targets -@pytest.mark.temp_skip_ci(targets=['esp32c6'], reason='c6 support TBD') +@pytest.mark.esp32 +@pytest.mark.esp32c3 +@pytest.mark.esp32s2 +@pytest.mark.esp32s3 +@pytest.mark.esp32c2 @pytest.mark.ethernet_ota def test_examples_protocol_native_ota_example(dut: Dut) -> None: """ @@ -161,8 +164,11 @@ def test_examples_protocol_native_ota_example(dut: Dut) -> None: thread1.terminate() -@pytest.mark.supported_targets -@pytest.mark.temp_skip_ci(targets=['esp32c6'], reason='c6 support TBD') +@pytest.mark.esp32 +@pytest.mark.esp32c3 +@pytest.mark.esp32s2 +@pytest.mark.esp32s3 +@pytest.mark.esp32c2 @pytest.mark.ethernet_ota def test_examples_protocol_native_ota_example_truncated_bin(dut: Dut) -> None: """ @@ -212,8 +218,11 @@ def test_examples_protocol_native_ota_example_truncated_bin(dut: Dut) -> None: thread1.terminate() -@pytest.mark.supported_targets -@pytest.mark.temp_skip_ci(targets=['esp32c6'], reason='c6 support TBD') +@pytest.mark.esp32 +@pytest.mark.esp32c3 +@pytest.mark.esp32s2 +@pytest.mark.esp32s3 +@pytest.mark.esp32c2 @pytest.mark.ethernet_ota def test_examples_protocol_native_ota_example_truncated_header(dut: Dut) -> None: """ @@ -262,8 +271,11 @@ def test_examples_protocol_native_ota_example_truncated_header(dut: Dut) -> None thread1.terminate() -@pytest.mark.supported_targets -@pytest.mark.temp_skip_ci(targets=['esp32c6'], reason='c6 support TBD') +@pytest.mark.esp32 +@pytest.mark.esp32c3 +@pytest.mark.esp32s2 +@pytest.mark.esp32s3 +@pytest.mark.esp32c2 @pytest.mark.ethernet_ota def test_examples_protocol_native_ota_example_random(dut: Dut) -> None: """ @@ -312,8 +324,11 @@ def test_examples_protocol_native_ota_example_random(dut: Dut) -> None: thread1.terminate() -@pytest.mark.supported_targets -@pytest.mark.temp_skip_ci(targets=['esp32c6'], reason='c6 support TBD') +@pytest.mark.esp32 +@pytest.mark.esp32c3 +@pytest.mark.esp32s2 +@pytest.mark.esp32s3 +@pytest.mark.esp32c2 @pytest.mark.ethernet_ota def test_examples_protocol_native_ota_example_chunked(dut: Dut) -> None: """ diff --git a/tools/ci/python_packages/ttfw_idf/IDFAssignTest.py b/tools/ci/python_packages/ttfw_idf/IDFAssignTest.py index 954d268fbd..3b8262f8ba 100644 --- a/tools/ci/python_packages/ttfw_idf/IDFAssignTest.py +++ b/tools/ci/python_packages/ttfw_idf/IDFAssignTest.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Apache-2.0 """ Command line tool to assign tests to CI test jobs. @@ -120,6 +120,7 @@ class UnitTestGroup(IDFCaseGroup): 'esp32c2': 'ESP32C2DUT', 'esp32c3': 'ESP32C3DUT', 'esp32c6': 'ESP32C6DUT', + 'esp32h2': 'ESP32H2DUT', 'esp8266': 'ESP8266DUT', } diff --git a/tools/ci/python_packages/ttfw_idf/IDFDUT.py b/tools/ci/python_packages/ttfw_idf/IDFDUT.py index 660bda02e4..4653331ba9 100644 --- a/tools/ci/python_packages/ttfw_idf/IDFDUT.py +++ b/tools/ci/python_packages/ttfw_idf/IDFDUT.py @@ -631,6 +631,15 @@ class ESP32C6DUT(IDFDUT): return targets.ESP32C6ROM +class ESP32H2DUT(IDFDUT): + TARGET = 'esp32h2' + TOOLCHAIN_PREFIX = 'riscv32-esp-elf-' + + @classmethod + def get_rom(cls): + return targets.ESP32H2ROM + + class ESP32H4DUT(IDFDUT): TARGET = 'esp32h4' TOOLCHAIN_PREFIX = 'riscv32-esp-elf-' @@ -650,7 +659,7 @@ class ESP8266DUT(IDFDUT): def get_target_by_rom_class(cls): - for c in [ESP32DUT, ESP32S2DUT, ESP32S3DUT, ESP32C2DUT, ESP32C3DUT, ESP32C6DUT, ESP32H4DUT, ESP8266DUT, IDFQEMUDUT]: + for c in [ESP32DUT, ESP32S2DUT, ESP32S3DUT, ESP32C2DUT, ESP32C3DUT, ESP32C6DUT, ESP32H2DUT, ESP32H4DUT, ESP8266DUT, IDFQEMUDUT]: if c.get_rom() == cls: return c.TARGET return None diff --git a/tools/ci/python_packages/ttfw_idf/__init__.py b/tools/ci/python_packages/ttfw_idf/__init__.py index 477e63db8d..8e48f4ad64 100644 --- a/tools/ci/python_packages/ttfw_idf/__init__.py +++ b/tools/ci/python_packages/ttfw_idf/__init__.py @@ -14,7 +14,7 @@ from tiny_test_fw import TinyFW, Utility from .IDFApp import UT, ComponentUTApp, Example, IDFApp, LoadableElfTestApp, TestApp # noqa: export all Apps for users from .IDFDUT import (ESP32C2DUT, ESP32C3DUT, ESP32C3FPGADUT, ESP32C6DUT, ESP32DUT, # noqa: export DUTs for users - ESP32H4DUT, ESP32QEMUDUT, ESP32S2DUT, ESP32S3DUT, ESP32S3FPGADUT, ESP8266DUT, IDFDUT) + ESP32H2DUT, ESP32H4DUT, ESP32QEMUDUT, ESP32S2DUT, ESP32S3DUT, ESP32S3FPGADUT, ESP8266DUT, IDFDUT) from .unity_test_parser import TestFormat, TestResults # pass TARGET_DUT_CLS_DICT to Env.py to avoid circular dependency issue. @@ -28,6 +28,7 @@ TARGET_DUT_CLS_DICT = { 'ESP32S3FPGA': ESP32S3FPGADUT, 'ESP32C6': ESP32C6DUT, 'ESP32H4': ESP32H4DUT, + 'ESP32H2': ESP32H2DUT, } diff --git a/tools/test_apps/peripherals/i2c_wifi/pytest_i2c_wifi.py b/tools/test_apps/peripherals/i2c_wifi/pytest_i2c_wifi.py index c0e565fe68..2dd9b5e2e3 100644 --- a/tools/test_apps/peripherals/i2c_wifi/pytest_i2c_wifi.py +++ b/tools/test_apps/peripherals/i2c_wifi/pytest_i2c_wifi.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import pytest @@ -6,6 +6,7 @@ from pytest_embedded_idf.dut import IdfDut @pytest.mark.supported_targets +@pytest.mark.temp_skip_ci(targets=['esp32h2'], reason='h2 does not support wifi') @pytest.mark.generic def test_i2c_wifi_startup(dut: IdfDut) -> None: dut.expect_exact('I2C-WIFI test success') diff --git a/tools/test_apps/phy/phy_multi_init_data_test/pytest_phy_multi_init_data.py b/tools/test_apps/phy/phy_multi_init_data_test/pytest_phy_multi_init_data.py index 030bb96500..acde0b79c6 100644 --- a/tools/test_apps/phy/phy_multi_init_data_test/pytest_phy_multi_init_data.py +++ b/tools/test_apps/phy/phy_multi_init_data_test/pytest_phy_multi_init_data.py @@ -6,6 +6,7 @@ from pytest_embedded_idf.dut import IdfDut @pytest.mark.supported_targets +@pytest.mark.temp_skip_ci(targets=['esp32h2'], reason='h2 not supported') @pytest.mark.generic @pytest.mark.parametrize('config', [ 'phy_multiple_init_data', diff --git a/tools/unit-test-app/configs/default_2_h2 b/tools/unit-test-app/configs/default_2_h2 new file mode 100644 index 0000000000..4984e54f90 --- /dev/null +++ b/tools/unit-test-app/configs/default_2_h2 @@ -0,0 +1,3 @@ +# This config is split between targets since different component needs to be included +CONFIG_IDF_TARGET="esp32h2" +TEST_COMPONENTS=app_trace esp_eth esp_hid esp_netif esp_phy esp_wifi espcoredump hal lwip mdns mqtt newlib nvs_flash partition_table sdmmc diff --git a/tools/unit-test-app/configs/default_3_h2 b/tools/unit-test-app/configs/default_3_h2 new file mode 100644 index 0000000000..3cfdc38392 --- /dev/null +++ b/tools/unit-test-app/configs/default_3_h2 @@ -0,0 +1,3 @@ +# This config is split between targets since different component needs to be included +CONFIG_IDF_TARGET="esp32h2" +TEST_EXCLUDE_COMPONENTS=app_trace esp_eth esp_hid esp_netif esp_phy esp_ringbuf esp_wifi espcoredump hal lwip mdns mqtt newlib nvs_flash partition_table sdmmc esp_system driver soc spi_flash vfs diff --git a/tools/unit-test-app/configs/default_h2 b/tools/unit-test-app/configs/default_h2 new file mode 100644 index 0000000000..a7b6a1629a --- /dev/null +++ b/tools/unit-test-app/configs/default_h2 @@ -0,0 +1,3 @@ +# This config is split between targets since different component needs to be included +CONFIG_IDF_TARGET="esp32h2" +TEST_COMPONENTS=esp_system driver soc spi_flash vfs diff --git a/tools/unit-test-app/configs/freertos_compliance_h2 b/tools/unit-test-app/configs/freertos_compliance_h2 new file mode 100644 index 0000000000..83002987c0 --- /dev/null +++ b/tools/unit-test-app/configs/freertos_compliance_h2 @@ -0,0 +1,4 @@ +# This config is split between targets since different component needs to be included +CONFIG_IDF_TARGET="esp32h2" +TEST_COMPONENTS=driver esp_hw_support esp_system spi_flash +CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE=y diff --git a/tools/unit-test-app/configs/no_optimization_h2 b/tools/unit-test-app/configs/no_optimization_h2 new file mode 100644 index 0000000000..50546d8304 --- /dev/null +++ b/tools/unit-test-app/configs/no_optimization_h2 @@ -0,0 +1,3 @@ +CONFIG_IDF_TARGET="esp32h2" +TEST_COMPONENTS=esp_ipc spi_flash +CONFIG_COMPILER_OPTIMIZATION_NONE=y diff --git a/tools/unit-test-app/configs/release_h2 b/tools/unit-test-app/configs/release_h2 new file mode 100644 index 0000000000..f101947cea --- /dev/null +++ b/tools/unit-test-app/configs/release_h2 @@ -0,0 +1,5 @@ +CONFIG_IDF_TARGET="esp32h2" +TEST_COMPONENTS=esp_hw_support esp_system esp_ipc driver soc spi_flash vfs sdmmc +CONFIG_COMPILER_OPTIMIZATION_SIZE=y +CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y +CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y diff --git a/tools/unit-test-app/configs/rom_options_h2 b/tools/unit-test-app/configs/rom_options_h2 new file mode 100644 index 0000000000..c2e3834787 --- /dev/null +++ b/tools/unit-test-app/configs/rom_options_h2 @@ -0,0 +1,3 @@ +CONFIG_IDF_TARGET="esp32h2" +TEST_COMPONENTS=spi_flash +CONFIG_SPI_FLASH_ROM_IMPL=y diff --git a/tools/unit-test-app/tools/ConfigDependency.yml b/tools/unit-test-app/tools/ConfigDependency.yml index cf9cc0ae46..6d04a00a6b 100644 --- a/tools/unit-test-app/tools/ConfigDependency.yml +++ b/tools/unit-test-app/tools/ConfigDependency.yml @@ -6,6 +6,7 @@ "ESP32C2_IDF": "CONFIG_IDF_TARGET_ESP32C2=y" "ESP32C3_IDF": "CONFIG_IDF_TARGET_ESP32C3=y" "ESP32C6_IDF": "CONFIG_IDF_TARGET_ESP32C6=y" +"ESP32H2_IDF": "CONFIG_IDF_TARGET_ESP32H2=y" "quad_psram": '{CONFIG_SPIRAM_MODE_QUAD=y} and {CONFIG_IDF_TARGET_ESP32S3=y}' "octal_psram": '{CONFIG_SPIRAM_MODE_OCT=y} and {CONFIG_IDF_TARGET_ESP32S3=y}' "xtal_26mhz": '{CONFIG_XTAL_FREQ_26=y} and {CONFIG_IDF_TARGET_ESP32C2=y}'