diff --git a/components/esp_driver_i2c/test_apps/.build-test-rules.yml b/components/esp_driver_i2c/test_apps/.build-test-rules.yml index 5436c0467e..4df5bbf772 100644 --- a/components/esp_driver_i2c/test_apps/.build-test-rules.yml +++ b/components/esp_driver_i2c/test_apps/.build-test-rules.yml @@ -3,5 +3,9 @@ components/esp_driver_i2c/test_apps/i2c_test_apps: disable: - if: SOC_I2C_SUPPORTED != 1 + disable_test: + - if: IDF_TARGET in ["esp32h21", "esp32p4"] + temporary: true + reason: p4 rev3 migration # TODO: IDF-14395 depends_components: - esp_driver_i2c 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 4b132cadba..fbfa3c756a 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 @@ -15,6 +15,7 @@ from pytest_embedded_idf.utils import soc_filtered_targets ], indirect=True, ) +@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration # TODO: IDF-14395') @idf_parametrize('target', ['supported_targets'], indirect=['target']) def test_i2c(dut: Dut) -> None: dut.run_all_single_board_cases() diff --git a/components/esp_driver_spi/test_apps/.build-test-rules.yml b/components/esp_driver_spi/test_apps/.build-test-rules.yml index 15a8fc81b5..b269fe7502 100644 --- a/components/esp_driver_spi/test_apps/.build-test-rules.yml +++ b/components/esp_driver_spi/test_apps/.build-test-rules.yml @@ -18,15 +18,27 @@ components/esp_driver_spi/test_apps/master: components/esp_driver_spi/test_apps/param: disable: - if: SOC_GPSPI_SUPPORTED != 1 + disable_test: + - if: IDF_TARGET in ["esp32h21", "esp32p4"] + temporary: true + reason: p4 rev3 migration # TODO: IDF-14399 <<: *spi_depends_default components/esp_driver_spi/test_apps/slave: disable: - if: SOC_GPSPI_SUPPORTED != 1 + disable_test: + - if: IDF_TARGET in ["esp32h21", "esp32p4"] + temporary: true + reason: p4 rev3 migration # TODO: IDF-14399 <<: *spi_depends_default components/esp_driver_spi/test_apps/slave_hd: disable: - if: SOC_GPSPI_SUPPORTED != 1 - if: SOC_SPI_SUPPORT_SLAVE_HD_VER2 != 1 + disable_test: + - if: IDF_TARGET in ["esp32h21", "esp32p4", "esp32c61"] + temporary: true + reason: p4 rev3 migration # TODO: IDF-14399 <<: *spi_depends_default 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 5eb348b567..0178177384 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 @@ -5,6 +5,7 @@ from pytest_embedded_idf.utils import idf_parametrize @pytest.mark.generic +@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration # TODO: IDF-14399') @idf_parametrize('target', ['supported_targets'], indirect=['target']) def test_param_single_dev(case_tester) -> None: # type: ignore case_tester.run_all_normal_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 cb22fca656..90c6c17575 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 @@ -6,6 +6,7 @@ from pytest_embedded_idf.utils import idf_parametrize @pytest.mark.generic @pytest.mark.parametrize('config', ['release', 'iram_safe'], indirect=True) +@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration # TODO: IDF-14399') @idf_parametrize('target', ['supported_targets'], indirect=['target']) def test_slave_single_dev(case_tester) -> None: # type: ignore case_tester.run_all_normal_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 554117fbd6..b19a86ab8a 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 @@ -8,6 +8,7 @@ from pytest_embedded_idf.utils import idf_parametrize @pytest.mark.generic @pytest.mark.parametrize('config', ['release'], indirect=True) +@pytest.mark.temp_skip_ci(targets=['esp32p4', 'esp32c61'], reason='p4 rev3 migration # TODO: IDF-14399') @idf_parametrize( 'target', ['esp32s2', 'esp32s3', 'esp32c2', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32c61', 'esp32h2', 'esp32p4'], @@ -20,11 +21,11 @@ def test_slave_hd_single_dev(case_tester) -> None: # type: ignore # if `test_env` not defined, will run on `generic_multi_device` by default @pytest.mark.generic_multi_device @pytest.mark.parametrize('count, config', [(2, 'release')], indirect=True) +@pytest.mark.temp_skip_ci(targets=['esp32p4', 'esp32c61'], reason='p4 rev3 migration # TODO: IDF-14399') @idf_parametrize( 'target', ['esp32s2', 'esp32s3', 'esp32c2', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'], indirect=['target'], ) -@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration # TODO: IDF-14399') def test_slave_hd_multi_dev(case_tester) -> None: # type: ignore case_tester.run_all_multi_dev_cases(reset=True) diff --git a/components/usb/test_apps/hcd/pytest_usb_hcd.py b/components/usb/test_apps/hcd/pytest_usb_hcd.py index 2ea80b9a61..65389b1400 100644 --- a/components/usb/test_apps/hcd/pytest_usb_hcd.py +++ b/components/usb/test_apps/hcd/pytest_usb_hcd.py @@ -5,14 +5,15 @@ from pytest_embedded import Dut from pytest_embedded_idf.utils import idf_parametrize -@pytest.mark.temp_skip_ci(targets=['esp32s2'], reason='lack of runners with usb_host_flash_disk tag') +@pytest.mark.temp_skip_ci( + targets=['esp32s2', 'esp32p4'], reason='lack of runners with usb_host_flash_disk tag, p4 rev3 migration, IDF-14832' +) @pytest.mark.usb_host_flash_disk @idf_parametrize( 'config,target', [('default', 'esp32s2'), ('default', 'esp32s3'), ('default', 'esp32p4'), ('esp32p4_psram', 'esp32p4')], indirect=['config', 'target'], ) -@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration, IDF-14832') def test_usb_hcd(dut: Dut) -> None: if dut.target == 'esp32p4': dut.run_all_single_board_cases(group='high_speed', reset=True) diff --git a/components/usb/test_apps/usb_host/pytest_usb_host.py b/components/usb/test_apps/usb_host/pytest_usb_host.py index 6cf5d3ace0..c9c7607c08 100644 --- a/components/usb/test_apps/usb_host/pytest_usb_host.py +++ b/components/usb/test_apps/usb_host/pytest_usb_host.py @@ -6,7 +6,7 @@ from pytest_embedded_idf.utils import idf_parametrize @pytest.mark.temp_skip_ci( - targets=['esp32s2, esp32p4'], reason='lack of runners with usb_host_flash_disk tag, p4 rev3 migration, IDF-14832' + targets=['esp32s2', 'esp32p4'], reason='lack of runners with usb_host_flash_disk tag, p4 rev3 migration, IDF-14832' ) @pytest.mark.usb_host_flash_disk @idf_parametrize('target', ['esp32s2', 'esp32s3', 'esp32p4'], indirect=['target']) diff --git a/examples/peripherals/.build-test-rules.yml b/examples/peripherals/.build-test-rules.yml index 7271a5f40b..f36b1c9752 100644 --- a/examples/peripherals/.build-test-rules.yml +++ b/examples/peripherals/.build-test-rules.yml @@ -512,11 +512,23 @@ examples/peripherals/twai/twai_error_recovery: depends_components: - esp_driver_twai -examples/peripherals/twai/twai_network: +examples/peripherals/twai/twai_network/twai_listen_only: disable: - if: SOC_TWAI_SUPPORTED != 1 disable_test: - - if: IDF_TARGET == "esp32p4" + - if: IDF_TARGET in ["esp32p4", "esp32h2"] + temporary: true + reason: p4 rev3 migration # TODO: IDF-14393 + depends_components: + - esp_driver_twai + + + +examples/peripherals/twai/twai_network/twai_sender: + disable: + - if: SOC_TWAI_SUPPORTED != 1 + disable_test: + - if: IDF_TARGET in ["esp32p4", "esp32c5"] temporary: true reason: p4 rev3 migration # TODO: IDF-14393 depends_components: diff --git a/examples/peripherals/usb/host/msc/pytest_usb_host_msc.py b/examples/peripherals/usb/host/msc/pytest_usb_host_msc.py index a645673b01..76bbdc0a62 100644 --- a/examples/peripherals/usb/host/msc/pytest_usb_host_msc.py +++ b/examples/peripherals/usb/host/msc/pytest_usb_host_msc.py @@ -6,7 +6,7 @@ from pytest_embedded_idf.utils import idf_parametrize @pytest.mark.temp_skip_ci( - targets=['esp32s2, esp32p4'], reason='lack of runners with usb_host_flash_disk tag,p4 rev3 migration, IDF-14832' + targets=['esp32s2', 'esp32p4'], reason='lack of runners with usb_host_flash_disk tag,p4 rev3 migration, IDF-14832' ) @pytest.mark.usb_host_flash_disk @idf_parametrize( diff --git a/examples/peripherals/usb/host/usb_host_lib/pytest_usb_host_lib.py b/examples/peripherals/usb/host/usb_host_lib/pytest_usb_host_lib.py index decf3a4bff..965bd498b4 100644 --- a/examples/peripherals/usb/host/usb_host_lib/pytest_usb_host_lib.py +++ b/examples/peripherals/usb/host/usb_host_lib/pytest_usb_host_lib.py @@ -6,7 +6,7 @@ from pytest_embedded_idf.utils import idf_parametrize @pytest.mark.temp_skip_ci( - targets=['esp32s2, esp32p4'], reason='lack of runners with usb_host_flash_disk tag,p4 rev3 migration, IDF-14832' + targets=['esp32s2', 'esp32p4'], reason='lack of runners with usb_host_flash_disk tag,p4 rev3 migration, IDF-14832' ) @pytest.mark.usb_host_flash_disk @idf_parametrize('target', ['esp32s2', 'esp32s3', 'esp32p4'], indirect=['target']) diff --git a/tools/ci/idf_pytest/plugin.py b/tools/ci/idf_pytest/plugin.py index cfbeca5e4d..77a14526cc 100644 --- a/tools/ci/idf_pytest/plugin.py +++ b/tools/ci/idf_pytest/plugin.py @@ -25,12 +25,12 @@ from pytest_embedded.utils import to_list from pytest_ignore_test_results.ignore_results import ChildCase from pytest_ignore_test_results.ignore_results import ChildCasesStashKey -from .constants import CollectMode from .constants import DEFAULT_SDKCONFIG from .constants import PREVIEW_TARGETS +from .constants import SUPPORTED_TARGETS +from .constants import CollectMode from .constants import PytestApp from .constants import PytestCase -from .constants import SUPPORTED_TARGETS from .utils import comma_sep_str_to_list from .utils import format_case_id from .utils import merge_junit_files @@ -82,7 +82,11 @@ class IdfPytestEmbedded: self._single_target_duplicate_mode = single_target_duplicate_mode self.apps_list = ( - [os.path.join(idf_relpath(app.app_dir), app.build_dir) for app in apps if app.build_status == BuildStatus.SUCCESS] + [ + os.path.join(idf_relpath(app.app_dir), app.build_dir) + for app in apps + if app.build_status == BuildStatus.SUCCESS + ] if apps is not None else None ) @@ -137,7 +141,7 @@ class IdfPytestEmbedded: return PytestCase( apps=[PytestApp(app_paths[i], targets[i], configs[i]) for i in range(count)], item=item, - multi_dut_without_param=multi_dut_without_param + multi_dut_without_param=multi_dut_without_param, ) def pytest_collectstart(self) -> None: @@ -270,9 +274,10 @@ class IdfPytestEmbedded: case = item_to_case_dict[item] target = self.get_param(item, 'target', None) if ( - not case.is_single_dut_test_case and - target is not None and - target not in case.skip_targets + not case.is_single_dut_test_case + and target is not None + and target not in case.skip_targets + and not any([_t in target for _t in case.skip_targets if '|' not in _t]) ): filtered_items.append(item) items[:] = filtered_items