diff --git a/.gitlab/ci/target-test.yml b/.gitlab/ci/target-test.yml index 1dbe0a5651..e5f088ae06 100644 --- a/.gitlab/ci/target-test.yml +++ b/.gitlab/ci/target-test.yml @@ -312,7 +312,7 @@ pytest_examples_esp32c2eco4_wifi_ap: - .rules:test:example_test-esp32c2-wifi needs: - build_pytest_examples_esp32c2 - tags: [ esp32c2eco4, wifi_ap, xtal_26mhz, esp32c2] + tags: [ wifi_ap_eco, xtal_26mhz, esp32c2] pytest_examples_esp32c3_wifi_ap: extends: @@ -329,7 +329,7 @@ pytest_examples_esp32c3eco7_wifi_ap: - .rules:test:example_test-esp32c3-wifi needs: - build_pytest_examples_esp32c3 - tags: [ esp32c3eco7, wifi_ap , esp32c3] + tags: [ wifi_ap_eco , esp32c3] pytest_examples_esp32s3_wifi_ap: extends: @@ -440,7 +440,7 @@ pytest_examples_esp32c2eco4_wifi_two_dut: - .rules:test:example_test-esp32c2-wifi needs: - build_pytest_examples_esp32c2 - tags: [ esp32c2eco4, wifi_two_dut, xtal_26mhz, esp32c2] + tags: [wifi_two_dut_eco, xtal_26mhz, esp32c2] pytest_examples_esp32c3eco7_wifi_two_dut: extends: @@ -448,7 +448,7 @@ pytest_examples_esp32c3eco7_wifi_two_dut: - .rules:test:example_test-esp32c3-wifi needs: - build_pytest_examples_esp32c3 - tags: [ esp32c3eco7, wifi_two_dut , esp32c3] + tags: [ wifi_two_dut_eco , esp32c3] pytest_examples_esp32c3_flash_encryption: extends: @@ -930,7 +930,7 @@ pytest_components_esp32c3eco7_wifi_two_dut: - .rules:test:component_ut-esp32c3-wifi needs: - build_pytest_components_esp32c3 - tags: [ esp32c3eco7, wifi_two_dut , esp32c3] + tags: [ wifi_two_dut_eco , esp32c3] pytest_components_esp32c2eco4_wifi_two_dut: extends: @@ -938,7 +938,7 @@ pytest_components_esp32c2eco4_wifi_two_dut: - .rules:test:component_ut-esp32c2-wifi needs: - build_pytest_components_esp32c2 - tags: [ esp32c2eco4, wifi_two_dut, xtal_26mhz, esp32c2] + tags: [ wifi_two_dut_eco, xtal_26mhz, esp32c2] pytest_components_esp32c3_adc: extends: @@ -1145,6 +1145,22 @@ pytest_test_apps_esp32c2_generic: - build_pytest_test_apps_esp32c2 tags: [ esp32c2, generic, xtal_40mhz ] +pytest_test_apps_esp32c2xtal26mhz_generic: + extends: + - .pytest_test_apps_dir_template + - .rules:test:custom_test-esp32c2 + needs: + - build_pytest_test_apps_esp32c2 + tags: [ esp32c2, generic, xtal_26mhz ] + +pytest_test_apps_esp32c2eco4_xtal26mhz_generic: + extends: + - .pytest_test_apps_dir_template + - .rules:test:custom_test-esp32c2 + needs: + - build_pytest_test_apps_esp32c2 + tags: [ esp32c2, generic_eco, xtal_26mhz ] + pytest_test_apps_esp32c3_generic: extends: - .pytest_test_apps_dir_template @@ -1153,6 +1169,14 @@ pytest_test_apps_esp32c3_generic: - build_pytest_test_apps_esp32c3 tags: [ esp32c3, generic ] +pytest_test_apps_esp32c3eco7_generic: + extends: + - .pytest_test_apps_dir_template + - .rules:test:custom_test-esp32c3 + needs: + - build_pytest_test_apps_esp32c3 + tags: [ esp32c3, generic_eco ] + pytest_test_apps_esp32c6_generic: extends: - .pytest_test_apps_dir_template diff --git a/components/esp_wifi/test_apps/wifi_connect/pytest_wifi_connect.py b/components/esp_wifi/test_apps/wifi_connect/pytest_wifi_connect.py index 9cd32cf6e2..ec1023257a 100644 --- a/components/esp_wifi/test_apps/wifi_connect/pytest_wifi_connect.py +++ b/components/esp_wifi/test_apps/wifi_connect/pytest_wifi_connect.py @@ -17,9 +17,9 @@ def test_wifi_connect_cases(case_tester: CaseTester) -> None: # type: ignore @pytest.mark.wifi_two_dut @pytest.mark.xtal_26mhz @pytest.mark.parametrize( - 'count, config, baud, target', + 'count, config, baud', [ - (2, 'esp32c2_xtal26m', '74880','esp32c2|esp32c2'), + (2, 'esp32c2_xtal26m', '74880'), ], indirect=True, ) @@ -27,13 +27,13 @@ def test_wifi_connect_cases_esp32c2_xtal26m(case_tester: CaseTester) -> None: case_tester.run_all_cases() -@pytest.mark.esp32c2eco4 -@pytest.mark.wifi_two_dut +@pytest.mark.esp32c2 +@pytest.mark.wifi_two_dut_eco @pytest.mark.xtal_26mhz @pytest.mark.parametrize( - 'count, config, baud, target', + 'count, config, baud, ', [ - (2, 'esp32c2eco4_xtal26m', '74880','esp32c2|esp32c2'), + (2, 'esp32c2eco4_xtal26m', '74880',), ], indirect=True, ) @@ -41,12 +41,12 @@ def test_wifi_connect_cases_esp32c2eco4_xtal26m(case_tester: CaseTester) -> None case_tester.run_all_cases() -@pytest.mark.wifi_two_dut -@pytest.mark.esp32c3eco7 +@pytest.mark.wifi_two_dut_eco +@pytest.mark.esp32c3 @pytest.mark.parametrize( - 'count, config, target', + 'count, config,', [ - (2, 'esp32c3eco7','esp32c3|esp32c3'), + (2, 'esp32c3eco7',), ], indirect=True, ) diff --git a/components/esp_wifi/test_apps/wifi_connect/sdkconfig.ci.c3eco7 b/components/esp_wifi/test_apps/wifi_connect/sdkconfig.ci.esp32c3eco7 similarity index 100% rename from components/esp_wifi/test_apps/wifi_connect/sdkconfig.ci.c3eco7 rename to components/esp_wifi/test_apps/wifi_connect/sdkconfig.ci.esp32c3eco7 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 390791f1bc..eac415cc1a 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 @@ -1,6 +1,5 @@ -# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 - import pytest from pytest_embedded import Dut @@ -17,6 +16,7 @@ def test_wifi_unit_test(dut: Dut) -> None: @pytest.mark.esp32c2 +@pytest.mark.generic @pytest.mark.xtal_26mhz @pytest.mark.parametrize( 'config, baud', @@ -27,3 +27,30 @@ def test_wifi_unit_test(dut: Dut) -> None: ) def test_wifi_connect_cases_esp32c2_xtal26m(dut: Dut) -> None: dut.run_all_single_board_cases() + + +@pytest.mark.esp32c2 +@pytest.mark.xtal_26mhz +@pytest.mark.generic_eco +@pytest.mark.parametrize( + 'config, baud', + [ + ('esp32c2eco4_xtal26m', '74880'), + ], + indirect=True, +) +def test_wifi_unit_test_esp32c2eco4_xtal26m(dut: Dut) -> None: + dut.run_all_single_board_cases() + + +@pytest.mark.esp32c3 +@pytest.mark.generic_eco +@pytest.mark.parametrize( + 'config', + [ + ('esp32c3eco7') + ], + indirect=True, +) +def test_wifi_unit_test_esp32c3eco7(dut: Dut) -> None: + dut.run_all_single_board_cases() diff --git a/conftest.py b/conftest.py index 007d20ada1..382a0be762 100644 --- a/conftest.py +++ b/conftest.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Apache-2.0 # pylint: disable=W0621 # redefined-outer-name # This file is a pytest root configuration file and provide the following functionalities: @@ -139,8 +139,10 @@ ENV_MARKERS = { 'twai_network': 'multiple runners form a TWAI network.', 'sdio_master_slave': 'Test sdio multi board.', 'usj_device': 'Test usb_serial_jtag and usb_serial_jtag is used as serial only (not console)', - 'esp32c3eco7': 'esp32c3 major version(v1.1) chips', - 'esp32c2eco4': 'esp32c2 major version(v2.0) chips', + 'wifi_ap_eco': 'a wifi AP in the environment for major version chips', + 'generic_eco': 'tests should be run on generic runners for major version chips', + 'wifi_two_dut_eco': 'tests should be run on runners which has two wifi duts connected for major version chips', + } diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.ci.esp32c2eco4_xtal26m.esp32c2_xtal26m b/examples/bluetooth/nimble/power_save/sdkconfig.ci.esp32c2eco4_xtal26m similarity index 100% rename from examples/bluetooth/nimble/power_save/sdkconfig.ci.esp32c2eco4_xtal26m.esp32c2_xtal26m rename to examples/bluetooth/nimble/power_save/sdkconfig.ci.esp32c2eco4_xtal26m diff --git a/examples/bluetooth/nimble/pytest_nimble_test.py b/examples/bluetooth/nimble/pytest_nimble_test.py index 6130b0cd63..fdfdb10884 100644 --- a/examples/bluetooth/nimble/pytest_nimble_test.py +++ b/examples/bluetooth/nimble/pytest_nimble_test.py @@ -63,18 +63,17 @@ def test_power_save_conn_esp32c2_26mhz(dut: Tuple[IdfDut, IdfDut]) -> None: # Case 2: BLE power save test for ESP32C2ECO4 -@pytest.mark.wifi_two_dut +@pytest.mark.esp32c2 +@pytest.mark.wifi_two_dut_eco @pytest.mark.xtal_26mhz -@pytest.mark.esp32c2eco4 @pytest.mark.parametrize( - 'config, count, app_path, baud, target', + 'config, count, app_path, baud,', [ ( 'esp32c2eco4_xtal26m', 2, f'{os.path.join(os.path.dirname(__file__), "power_save")}|{os.path.join(os.path.dirname(__file__), "blecent")}', '74880', - 'esp32c2|esp32c2', ), ], indirect=True, @@ -94,16 +93,15 @@ def test_power_save_conn_esp32c2eco4_26mhz(dut: Tuple[IdfDut, IdfDut]) -> None: # Case 2: BLE power save test for ESP32C3ECO7 -@pytest.mark.wifi_two_dut -@pytest.mark.esp32c3eco7 +@pytest.mark.esp32c3 +@pytest.mark.wifi_two_dut_eco @pytest.mark.parametrize( - 'config, count, app_path, target', + 'config, count, app_path', [ ( 'esp32c3eco7', 2, f'{os.path.join(os.path.dirname(__file__), "power_save")}|{os.path.join(os.path.dirname(__file__), "blecent")}', - 'esp32c3|esp32c3', ), ], indirect=True, diff --git a/examples/wifi/getting_started/pytest_wifi_getting_started.py b/examples/wifi/getting_started/pytest_wifi_getting_started.py index 8cc94a048d..59aa3999ac 100644 --- a/examples/wifi/getting_started/pytest_wifi_getting_started.py +++ b/examples/wifi/getting_started/pytest_wifi_getting_started.py @@ -69,18 +69,17 @@ def test_wifi_getting_started_esp32c2_xtal_26mhz(dut: Tuple[IdfDut, IdfDut]) -> softap.expect('station .+ join, AID=', timeout=60) -@pytest.mark.wifi_two_dut +@pytest.mark.esp32c2 +@pytest.mark.wifi_two_dut_eco @pytest.mark.xtal_26mhz -@pytest.mark.esp32c2eco4 @pytest.mark.parametrize( - 'count, config, baud, app_path, target', + 'count, config, baud, app_path,', [ ( 2, 'esp32c2eco4_xtal26m', '74880', f'{os.path.join(os.path.dirname(__file__), "softAP")}|{os.path.join(os.path.dirname(__file__), "station")}', - 'esp32c2|esp32c2', ), ], indirect=True, @@ -101,16 +100,15 @@ def test_wifi_getting_started_esp32c2eco4_xtal_26mhz(dut: Tuple[IdfDut, IdfDut]) softap.expect('station .+ join, AID=', timeout=60) -@pytest.mark.wifi_two_dut -@pytest.mark.esp32c3eco7 +@pytest.mark.esp32c3 +@pytest.mark.wifi_two_dut_eco @pytest.mark.parametrize( - 'count, config, app_path, target', + 'count, config, app_path', [ ( 2, 'esp32c3eco7', f'{os.path.join(os.path.dirname(__file__), "softAP")}|{os.path.join(os.path.dirname(__file__), "station")}', - 'esp32c3|esp32c3', ), ], indirect=True, diff --git a/examples/wifi/getting_started/softAP/sdkconfig.ci.c3eco7 b/examples/wifi/getting_started/softAP/sdkconfig.ci.esp32c3eco7 similarity index 100% rename from examples/wifi/getting_started/softAP/sdkconfig.ci.c3eco7 rename to examples/wifi/getting_started/softAP/sdkconfig.ci.esp32c3eco7 diff --git a/examples/wifi/getting_started/station/sdkconfig.ci.c3eco7 b/examples/wifi/getting_started/station/sdkconfig.ci.esp32c3eco7 similarity index 100% rename from examples/wifi/getting_started/station/sdkconfig.ci.c3eco7 rename to examples/wifi/getting_started/station/sdkconfig.ci.esp32c3eco7 diff --git a/examples/wifi/getting_started/station/sdkconfig.defaults b/examples/wifi/getting_started/station/sdkconfig.defaults new file mode 100644 index 0000000000..42b9e74caa --- /dev/null +++ b/examples/wifi/getting_started/station/sdkconfig.defaults @@ -0,0 +1 @@ +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n diff --git a/examples/wifi/power_save/pytest_wifi_power_save.py b/examples/wifi/power_save/pytest_wifi_power_save.py index cde5682399..9046ed1d51 100644 --- a/examples/wifi/power_save/pytest_wifi_power_save.py +++ b/examples/wifi/power_save/pytest_wifi_power_save.py @@ -77,9 +77,8 @@ def test_wifi_power_save_esp32c2_26mhz(dut: Dut) -> None: @pytest.mark.esp32c2 -@pytest.mark.wifi_ap +@pytest.mark.wifi_ap_eco @pytest.mark.xtal_26mhz -@pytest.mark.esp32c2eco4 @pytest.mark.parametrize( 'config, baud', [ @@ -91,12 +90,12 @@ def test_wifi_power_save_esp32c2eco4_26mhz(dut: Dut) -> None: _run_test(dut) -@pytest.mark.wifi_ap -@pytest.mark.esp32c3eco7 +@pytest.mark.wifi_ap_eco +@pytest.mark.esp32c3 @pytest.mark.parametrize( - 'config, target', + 'config', [ - ('c3eco7','esp32c3') + ('c3eco7') ], indirect=True, )