diff --git a/components/esp_driver_i2c/test_apps/i2c_test_apps/pytest_i2c.py b/components/esp_driver_i2c/test_apps/i2c_test_apps/pytest_i2c.py index 65ddbca3ab..174b3fae7f 100644 --- a/components/esp_driver_i2c/test_apps/i2c_test_apps/pytest_i2c.py +++ b/components/esp_driver_i2c/test_apps/i2c_test_apps/pytest_i2c.py @@ -3,6 +3,7 @@ import pytest from pytest_embedded import Dut from pytest_embedded_idf.utils import idf_parametrize +from pytest_embedded_idf.utils import soc_filtered_targets @pytest.mark.generic @@ -23,30 +24,15 @@ def test_i2c(dut: Dut) -> None: @pytest.mark.parametrize( 'count, config', [ - ( - 2, - 'defaults', - ), - ( - 2, - 'release', - ), - ( - 2, - 'iram_safe', - ), + (2, 'defaults'), + (2, 'release'), + (2, 'iram_safe'), ], indirect=True, ) -@idf_parametrize( - 'target', - ['esp32', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4', 'esp32s2', 'esp32s3'], - indirect=['target'], -) +@idf_parametrize('target', soc_filtered_targets('SOC_I2C_SUPPORTED == 1'), indirect=['target']) def test_i2c_multi_device(case_tester) -> None: # type: ignore - for case in case_tester.test_menu: - if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device': - case_tester.run_multi_dev_case(case=case, reset=True) + case_tester.run_all_multi_dev_cases(reset=True) @pytest.mark.flash_suspend diff --git a/components/esp_driver_i2s/test_apps/i2s_multi_dev/pytest_i2s_multi_dev.py b/components/esp_driver_i2s/test_apps/i2s_multi_dev/pytest_i2s_multi_dev.py index 06ba3a2bfe..d07ece199c 100644 --- a/components/esp_driver_i2s/test_apps/i2s_multi_dev/pytest_i2s_multi_dev.py +++ b/components/esp_driver_i2s/test_apps/i2s_multi_dev/pytest_i2s_multi_dev.py @@ -2,16 +2,11 @@ # SPDX-License-Identifier: Unlicense OR CC0-1.0 import pytest from pytest_embedded_idf.utils import idf_parametrize +from pytest_embedded_idf.utils import soc_filtered_targets @pytest.mark.generic_multi_device -@pytest.mark.parametrize( - 'count', - [ - 2, - ], - indirect=True, -) -@idf_parametrize('target', ['esp32s3', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'], indirect=['target']) +@pytest.mark.parametrize('count', [2], indirect=True) +@idf_parametrize('target', soc_filtered_targets('SOC_I2S_SUPPORTS_TDM == 1'), indirect=['target']) def test_i2s_multi_dev(case_tester) -> None: # type: ignore case_tester.run_all_multi_dev_cases(reset=True, timeout=30) diff --git a/components/esp_driver_ledc/test_apps/ledc/pytest_ledc.py b/components/esp_driver_ledc/test_apps/ledc/pytest_ledc.py index b3e6f5052e..70d71e0826 100644 --- a/components/esp_driver_ledc/test_apps/ledc/pytest_ledc.py +++ b/components/esp_driver_ledc/test_apps/ledc/pytest_ledc.py @@ -34,21 +34,13 @@ def test_ledc_psram(dut: IdfDut) -> None: dut.run_all_single_board_cases(reset=True) -@pytest.mark.temp_skip_ci( - targets=['esp32s3', 'esp32c61'], reason='s3 multi device runner has no psram, c61 lack of runner IDF-10949' -) +@pytest.mark.temp_skip_ci(targets=['esp32s3'], reason='s3 multi device runner has no psram') @pytest.mark.generic_multi_device @pytest.mark.parametrize( 'count, config', [ - ( - 2, - 'iram_safe', - ), - ( - 2, - 'release', - ), + (2, 'iram_safe'), + (2, 'release'), ], indirect=True, ) diff --git a/components/esp_driver_spi/test_apps/master/pytest_spi_master.py b/components/esp_driver_spi/test_apps/master/pytest_spi_master.py index 05d433fbc6..a141e21900 100644 --- a/components/esp_driver_spi/test_apps/master/pytest_spi_master.py +++ b/components/esp_driver_spi/test_apps/master/pytest_spi_master.py @@ -2,7 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 import pytest from pytest_embedded_idf.utils import idf_parametrize -# If `test_env` is define, should not run on generic runner @pytest.mark.generic @@ -18,7 +17,7 @@ from pytest_embedded_idf.utils import idf_parametrize def test_master_single_dev(case_tester) -> None: # type: ignore for case in case_tester.test_menu: if 'test_env' in case.attributes: - continue + continue # If `test_env` is defined, should not run on generic runner case_tester.run_normal_case(case=case, reset=True) @@ -39,9 +38,6 @@ def test_master_esp_flash(case_tester) -> None: # type: ignore case_tester.run_normal_case(case=case, reset=True) -# if `test_env` not defined, will run on `generic_multi_device` by default -# TODO: [ESP32C61] IDF-10949 -@pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='no multi-dev runner') @pytest.mark.generic_multi_device @pytest.mark.parametrize( 'count, config', @@ -54,6 +50,4 @@ def test_master_esp_flash(case_tester) -> None: # type: ignore ) @idf_parametrize('target', ['supported_targets'], indirect=['target']) def test_master_multi_dev(case_tester) -> None: # type: ignore - for case in case_tester.test_menu: - if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device': - case_tester.run_multi_dev_case(case=case, reset=True) + case_tester.run_all_multi_dev_cases(reset=True) diff --git a/components/esp_driver_spi/test_apps/param/main/test_spi_param.c b/components/esp_driver_spi/test_apps/param/main/test_spi_param.c index 41ba0b68bc..8651b517cb 100644 --- a/components/esp_driver_spi/test_apps/param/main/test_spi_param.c +++ b/components/esp_driver_spi/test_apps/param/main/test_spi_param.c @@ -1278,12 +1278,12 @@ static void test_master_fd_dma(void) .spics_io_num = PIN_NUM_CS, .queue_size = 16, .clock_speed_hz = s_spi_bus_freq[speed_level], + .cs_ena_pretrans = 2, }; #if CONFIG_IDF_TARGET_ESP32 if (is_gpio && (s_spi_bus_freq[speed_level] >= 10 * 1000 * 1000)) { continue; //On esp32 with GPIO Matrix, clk freq <= 10MHz } - devcfg.cs_ena_pretrans = 2; devcfg.input_delay_ns = 12.5 * 2; #endif TEST_ESP_OK(spi_bus_add_device(TEST_SPI_HOST, &devcfg, &dev0)); @@ -1393,12 +1393,12 @@ static void test_master_fd_no_dma(void) .spics_io_num = PIN_NUM_CS, .queue_size = 16, .clock_speed_hz = s_spi_bus_freq[speed_level], + .cs_ena_pretrans = 2, }; #if CONFIG_IDF_TARGET_ESP32 if (is_gpio && (s_spi_bus_freq[speed_level] >= 10 * 1000 * 1000)) { continue; //On esp32 with GPIO Matrix, clk freq <= 10MHz } - devcfg.cs_ena_pretrans = 2, devcfg.input_delay_ns = 12.5 * 2, #endif TEST_ESP_OK(spi_bus_add_device(TEST_SPI_HOST, &devcfg, &dev0)); @@ -1508,6 +1508,7 @@ static void test_master_hd_dma(void) spi_device_interface_config_t devcfg = { .spics_io_num = PIN_NUM_CS, .clock_speed_hz = s_spi_bus_freq[speed_level], + .cs_ena_pretrans = 2, .mode = mode, .flags = SPI_DEVICE_HALFDUPLEX, .command_bits = 8, @@ -1616,6 +1617,7 @@ static void test_master_hd_no_dma(void) spi_device_interface_config_t devcfg = { .spics_io_num = PIN_NUM_CS, .clock_speed_hz = s_spi_bus_freq[speed_level], + .cs_ena_pretrans = 2, .mode = mode, .flags = SPI_DEVICE_HALFDUPLEX, .command_bits = 8, @@ -1739,10 +1741,10 @@ static void test_master_sio_dma(void) .spics_io_num = PIN_NUM_CS, .queue_size = 16, .clock_speed_hz = s_spi_bus_freq[speed_level], + .cs_ena_pretrans = 2, .flags = SPI_DEVICE_HALFDUPLEX | SPI_DEVICE_3WIRE, }; #if CONFIG_IDF_TARGET_ESP32 - devcfg.cs_ena_pretrans = 2; devcfg.input_delay_ns = s_master_input_delay[speed_level]; #endif TEST_ESP_OK(spi_bus_add_device(TEST_SPI_HOST, &devcfg, &dev0)); @@ -1874,7 +1876,6 @@ static void test_master_sio_no_dma(void) .flags = SPI_DEVICE_HALFDUPLEX | SPI_DEVICE_3WIRE, }; #if CONFIG_IDF_TARGET_ESP32 - devcfg.cs_ena_pretrans = 2; devcfg.input_delay_ns = s_master_input_delay[speed_level]; #endif TEST_ESP_OK(spi_bus_add_device(TEST_SPI_HOST, &devcfg, &dev0)); diff --git a/components/esp_driver_spi/test_apps/param/pytest_spi_param.py b/components/esp_driver_spi/test_apps/param/pytest_spi_param.py index 049c6ec316..bd55a0ab78 100644 --- a/components/esp_driver_spi/test_apps/param/pytest_spi_param.py +++ b/components/esp_driver_spi/test_apps/param/pytest_spi_param.py @@ -2,31 +2,16 @@ # SPDX-License-Identifier: Apache-2.0 import pytest from pytest_embedded_idf.utils import idf_parametrize -# If `test_env` is define, should not run on generic runner @pytest.mark.generic @idf_parametrize('target', ['supported_targets'], indirect=['target']) def test_param_single_dev(case_tester) -> None: # type: ignore - for case in case_tester.test_menu: - if 'test_env' in case.attributes: - continue - case_tester.run_normal_case(case=case, reset=True) + case_tester.run_all_normal_cases(reset=True) -# if `test_env` not defined, will run on `generic_multi_device` by default -# TODO: [ESP32C61] IDF-10949 -@pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='no multi-dev runner') @pytest.mark.generic_multi_device -@pytest.mark.parametrize( - 'count', - [ - 2, - ], - indirect=True, -) +@pytest.mark.parametrize('count', [2], indirect=True) @idf_parametrize('target', ['supported_targets'], indirect=['target']) def test_param_multi_dev(case_tester) -> None: # type: ignore - for case in case_tester.test_menu: - if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device': - case_tester.run_multi_dev_case(case=case, reset=True) + case_tester.run_all_multi_dev_cases(reset=True) diff --git a/components/esp_driver_spi/test_apps/slave/pytest_spi_slave.py b/components/esp_driver_spi/test_apps/slave/pytest_spi_slave.py index b037f7499e..0b0adc8cbb 100644 --- a/components/esp_driver_spi/test_apps/slave/pytest_spi_slave.py +++ b/components/esp_driver_spi/test_apps/slave/pytest_spi_slave.py @@ -2,26 +2,17 @@ # SPDX-License-Identifier: Apache-2.0 import pytest from pytest_embedded_idf.utils import idf_parametrize -# If `test_env` is define, should not run on generic runner @pytest.mark.generic @pytest.mark.parametrize('config', ['release', 'iram_safe'], indirect=True) @idf_parametrize('target', ['supported_targets'], indirect=['target']) def test_slave_single_dev(case_tester) -> None: # type: ignore - for case in case_tester.test_menu: - if 'test_env' in case.attributes: - continue - case_tester.run_normal_case(case=case, reset=True) + case_tester.run_all_normal_cases(reset=True) -# if `test_env` not defined, will run on `generic_multi_device` by default -# TODO: [ESP32C61] IDF-10949 -@pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='no multi-dev runner') @pytest.mark.generic_multi_device @pytest.mark.parametrize('count, config', [(2, 'release'), (2, 'iram_safe')], indirect=True) @idf_parametrize('target', ['supported_targets'], indirect=['target']) def test_slave_multi_dev(case_tester) -> None: # type: ignore - for case in case_tester.test_menu: - if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device': - case_tester.run_multi_dev_case(case=case, reset=True) + case_tester.run_all_multi_dev_cases(reset=True) diff --git a/components/esp_driver_spi/test_apps/slave_hd/pytest_spi_slave_hd.py b/components/esp_driver_spi/test_apps/slave_hd/pytest_spi_slave_hd.py index ae44595ee1..3654ca7585 100644 --- a/components/esp_driver_spi/test_apps/slave_hd/pytest_spi_slave_hd.py +++ b/components/esp_driver_spi/test_apps/slave_hd/pytest_spi_slave_hd.py @@ -10,19 +10,11 @@ from pytest_embedded_idf.utils import soc_filtered_targets @pytest.mark.parametrize('config', ['release'], indirect=True) @idf_parametrize('target', soc_filtered_targets('SOC_SPI_SUPPORT_SLAVE_HD_VER2 == 1'), indirect=['target']) def test_slave_hd_single_dev(case_tester) -> None: # type: ignore - for case in case_tester.test_menu: - if 'test_env' in case.attributes: - continue # If `test_env` is define, should not run on generic runner - case_tester.run_normal_case(case=case, reset=True, timeout=180) + case_tester.run_all_normal_cases(reset=True, timeout=180) @pytest.mark.generic_multi_device -# TODO: [ESP32C61] IDF-10949 -@pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='no multi-dev runner') @pytest.mark.parametrize('count, config', [(2, 'release')], indirect=True) @idf_parametrize('target', soc_filtered_targets('SOC_SPI_SUPPORT_SLAVE_HD_VER2 == 1'), indirect=['target']) def test_slave_hd_multi_dev(case_tester) -> None: # type: ignore - for case in case_tester.test_menu: - # if `test_env` not defined, will run on `generic_multi_device` by default - if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device': - case_tester.run_multi_dev_case(case=case, reset=True) + case_tester.run_all_multi_dev_cases(reset=True) diff --git a/components/esp_driver_uart/test_apps/uart/pytest_uart.py b/components/esp_driver_uart/test_apps/uart/pytest_uart.py index 5db9c9b075..dd1e918abe 100644 --- a/components/esp_driver_uart/test_apps/uart/pytest_uart.py +++ b/components/esp_driver_uart/test_apps/uart/pytest_uart.py @@ -77,9 +77,10 @@ def test_uart_single_dev_psram(case_tester) -> None: # type: ignore dut.expect_unity_test_output() -# ESP32 only supports uart wakeup if signal routes through IOMUX, ESP32S3 multi device runner has no psram IDF-12837, -# ESP32C61 lack of runner IDF-10949, ESP32P4 not yet supported IDF-12839. -@pytest.mark.temp_skip_ci(targets=['esp32', 'esp32s3', 'esp32c61', 'esp32p4'], reason='no multi-dev runner') +# ESP32 only supports uart wakeup if signal routes through IOMUX +# ESP32S3 multi device runner has no psram IDF-12837, +# ESP32P4 not yet supported IDF-12839. +@pytest.mark.temp_skip_ci(targets=['esp32', 'esp32s3', 'esp32p4'], reason='no multi-dev runner') @pytest.mark.generic_multi_device @idf_parametrize('target', ['supported_targets'], indirect=['target']) @pytest.mark.parametrize( diff --git a/components/esp_hw_support/test_apps/wakeup_tests/pytest_wakeup_tests.py b/components/esp_hw_support/test_apps/wakeup_tests/pytest_wakeup_tests.py index 098754f50b..3560100cc7 100644 --- a/components/esp_hw_support/test_apps/wakeup_tests/pytest_wakeup_tests.py +++ b/components/esp_hw_support/test_apps/wakeup_tests/pytest_wakeup_tests.py @@ -11,10 +11,6 @@ TEST_CONFIGS = [ pytest.param('default'), ] -# TODO: PM-66 -# ESP32: need to fix GPIO16 and GPIO17 bug -# ESP32S2: need to fix GPIO43 bug -# ESP32S3: need to fix GPIO33, GPIO34 and GPIO43 bug available_gpio_nums = { 'esp32': [2, 4, 5, 12, 13, 14, 15, 18, 19, 21, 22, 23, 27], 'esp32s2': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 21, 33, 34, 35, 36, 37, 38, 39, 40, 42, 45], @@ -23,40 +19,10 @@ available_gpio_nums = { 'esp32c3': [0, 1, 2, 3, 4, 5, 6, 7, 10, 18, 19], 'esp32c6': [0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 15, 18, 19, 20, 21, 22, 23], 'esp32h2': [0, 1, 2, 3, 4, 5, 10, 11, 12, 22, 25, 26, 27], - 'esp32p4': [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 28, - 29, - 30, - 31, - 32, - 33, - 36, - 49, - 50, - 51, - 52, - 53, - 54, - ], + 'esp32p4': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17] + + [28, 29, 30, 31, 32, 33, 36, 49, 50, 51, 52, 53, 54], 'esp32c5': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 14, 23, 24, 25, 26], + 'esp32c61': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 22, 23, 24, 25, 26, 27, 28, 29], } available_rtcio_nums = { @@ -69,6 +35,7 @@ available_rtcio_nums = { 'esp32h2': [7, 8, 9, 10, 11, 12, 13, 14], 'esp32p4': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], 'esp32c5': [0, 1, 2, 3, 4, 5, 6], + 'esp32c61': [0, 1, 2, 3, 4, 5, 6], } @@ -175,11 +142,7 @@ def test_rtcio_deepsleep(dut: Tuple[IdfDut, IdfDut]) -> None: @pytest.mark.generic_multi_device @pytest.mark.parametrize('count', [2], indirect=True) @pytest.mark.parametrize('config', TEST_CONFIGS, indirect=True) -@idf_parametrize( - 'target', - ['esp32', 'esp32c2', 'esp32c3', 'esp32s2', 'esp32s3', 'esp32c6', 'esp32h2', 'esp32p4', 'esp32c5'], - indirect=['target'], -) +@idf_parametrize('target', ['supported_targets'], indirect=['target']) def test_gpio_wakeup_enable_lightsleep(dut: Tuple[IdfDut, IdfDut]) -> None: wakee = dut[0] waker = dut[1] diff --git a/components/ulp/test_apps/lp_core/lp_core_basic_tests/pytest_lp_core_basic.py b/components/ulp/test_apps/lp_core/lp_core_basic_tests/pytest_lp_core_basic.py index 653341e7e1..be0af9b9fc 100644 --- a/components/ulp/test_apps/lp_core/lp_core_basic_tests/pytest_lp_core_basic.py +++ b/components/ulp/test_apps/lp_core/lp_core_basic_tests/pytest_lp_core_basic.py @@ -45,7 +45,7 @@ def test_lp_vad(dut: Dut) -> None: dut.run_all_single_board_cases(group='lp_vad') -# TODO: Enable LP I2C test for esp32p4 (IDF-9407) +# TODO: Support LP I2C test for esp32p4 (IDF-9581) @pytest.mark.generic_multi_device @pytest.mark.parametrize('count', [2], indirect=True) @pytest.mark.parametrize( @@ -57,9 +57,7 @@ def test_lp_vad(dut: Dut) -> None: ) @idf_parametrize('target', ['esp32c6'], indirect=['target']) def test_lp_core_multi_device(case_tester) -> None: # type: ignore - for case in case_tester.test_menu: - if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device': - case_tester.run_multi_dev_case(case=case, reset=True) + case_tester.run_all_multi_dev_cases(reset=True) @pytest.mark.generic_multi_device diff --git a/components/ulp/test_apps/ulp_riscv/pytest_ulp_riscv.py b/components/ulp/test_apps/ulp_riscv/pytest_ulp_riscv.py index dacb99920d..fa6160adf3 100644 --- a/components/ulp/test_apps/ulp_riscv/pytest_ulp_riscv.py +++ b/components/ulp/test_apps/ulp_riscv/pytest_ulp_riscv.py @@ -15,6 +15,4 @@ def test_ulp_riscv(dut: Dut) -> None: # type: ignore @pytest.mark.parametrize('count', [2], indirect=True) @idf_parametrize('target', ['esp32s2', 'esp32s3'], indirect=['target']) def test_ulp_riscv_multi_device(case_tester) -> None: # type: ignore - for case in case_tester.test_menu: - if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device': - case_tester.run_multi_dev_case(case=case, reset=True) + case_tester.run_all_multi_dev_cases(reset=True) diff --git a/examples/system/.build-test-rules.yml b/examples/system/.build-test-rules.yml index 143e05c10e..233cc066f7 100644 --- a/examples/system/.build-test-rules.yml +++ b/examples/system/.build-test-rules.yml @@ -345,7 +345,7 @@ examples/system/ulp/lp_core/lp_i2c: disable: - if: IDF_TARGET == "esp32p4" temporary: true - reason: target esp32p4 is not supported yet, TODO IDF-9407 + reason: target esp32p4 is not supported yet, TODO IDF-9581 depends_components: - ulp