From a8482f580af1711ef093b0ab1a56867b6c4e7f8e Mon Sep 17 00:00:00 2001 From: Chen Yudong Date: Thu, 5 Sep 2024 13:29:33 +0800 Subject: [PATCH] ci: enable esp32c5/c6 wifi basic target tests --- components/esp_wifi/test_apps/.build-test-rules.yml | 6 ------ .../esp_wifi/test_apps/wifi_connect/main/test_wifi_conn.c | 2 +- .../esp_wifi/test_apps/wifi_connect/pytest_wifi_connect.py | 4 ++++ .../test_apps/wifi_function/pytest_wifi_function.py | 1 + examples/protocols/.build-test-rules.yml | 4 ---- examples/protocols/icmp_echo/README.md | 4 ++-- examples/protocols/icmp_echo/pytest_icmp_echo.py | 1 + examples/wifi/.build-test-rules.yml | 4 ---- .../wifi/getting_started/pytest_wifi_getting_started.py | 5 ++++- 9 files changed, 13 insertions(+), 18 deletions(-) diff --git a/components/esp_wifi/test_apps/.build-test-rules.yml b/components/esp_wifi/test_apps/.build-test-rules.yml index 35cbadb237..5df970f78e 100644 --- a/components/esp_wifi/test_apps/.build-test-rules.yml +++ b/components/esp_wifi/test_apps/.build-test-rules.yml @@ -3,13 +3,7 @@ components/esp_wifi/test_apps/wifi_connect: disable: - if: SOC_WIFI_SUPPORTED != 1 - disable_test: - - if: IDF_TARGET not in ["esp32", "esp32c3", "esp32s3", "esp32c2"] - reason: lack of runner components/esp_wifi/test_apps/wifi_function: disable: - if: SOC_WIFI_SUPPORTED != 1 - disable_test: - - if: IDF_TARGET == "esp32c61" - reason: lack of runner diff --git a/components/esp_wifi/test_apps/wifi_connect/main/test_wifi_conn.c b/components/esp_wifi/test_apps/wifi_connect/main/test_wifi_conn.c index 00dc105e42..2088774a55 100644 --- a/components/esp_wifi/test_apps/wifi_connect/main/test_wifi_conn.c +++ b/components/esp_wifi/test_apps/wifi_connect/main/test_wifi_conn.c @@ -31,7 +31,7 @@ #define TEST_DEFAULT_SSID "SSID_" CONFIG_IDF_TARGET TEST_SUFFIX_STR #define TEST_DEFAULT_PWD "PASS_" CONFIG_IDF_TARGET TEST_SUFFIX_STR #define TEST_DEFAULT_CHANNEL (6) -#define CONNECT_TIMEOUT_MS (8000) +#define CONNECT_TIMEOUT_MS (10000) #define GOT_IP_EVENT (1) #define WIFI_DISCONNECT_EVENT (1<<1) 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 1e85a967eb..8f52ec69e3 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 @@ -6,7 +6,11 @@ from pytest_embedded_idf.unity_tester import CaseTester @pytest.mark.esp32 @pytest.mark.esp32c3 +@pytest.mark.esp32s2 @pytest.mark.esp32s3 +@pytest.mark.esp32c5 +@pytest.mark.esp32c6 +@pytest.mark.esp32c61 @pytest.mark.wifi_two_dut @pytest.mark.parametrize('count', [2], indirect=True) def test_wifi_connect_cases(case_tester: CaseTester) -> None: # type: ignore 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 bcda4ab192..bdaa31ad27 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 @@ -9,6 +9,7 @@ from pytest_embedded import Dut @pytest.mark.esp32s2 @pytest.mark.esp32s3 @pytest.mark.esp32c6 +@pytest.mark.esp32c61 @pytest.mark.esp32c5 # @pytest.mark.esp32c2 # esp32c2 are using xtal_26mhz @pytest.mark.generic diff --git a/examples/protocols/.build-test-rules.yml b/examples/protocols/.build-test-rules.yml index 1c17877436..c0acc869d0 100644 --- a/examples/protocols/.build-test-rules.yml +++ b/examples/protocols/.build-test-rules.yml @@ -154,10 +154,6 @@ examples/protocols/https_x509_bundle: examples/protocols/icmp_echo: <<: *default_dependencies - disable: - - if: IDF_TARGET in ["esp32c61"] - temporary: true - reason: not supported on c61 # TODO: [ESP32-C5] IDF-8697, [ESP32C61] IDF-9298 disable_test: - if: SOC_WIFI_SUPPORTED != 1 diff --git a/examples/protocols/icmp_echo/README.md b/examples/protocols/icmp_echo/README.md index 3b0bdf3590..849ef92fa3 100644 --- a/examples/protocols/icmp_echo/README.md +++ b/examples/protocols/icmp_echo/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | -------- | -------- | # ICMP Echo-Reply (Ping) example diff --git a/examples/protocols/icmp_echo/pytest_icmp_echo.py b/examples/protocols/icmp_echo/pytest_icmp_echo.py index 87d405e481..d9a73635e1 100644 --- a/examples/protocols/icmp_echo/pytest_icmp_echo.py +++ b/examples/protocols/icmp_echo/pytest_icmp_echo.py @@ -40,6 +40,7 @@ def _run_test(dut: Dut) -> None: @pytest.mark.esp32s3 @pytest.mark.esp32c5 @pytest.mark.esp32c6 +@pytest.mark.esp32c61 @pytest.mark.wifi_ap def test_protocols_icmp_echo(dut: Dut) -> None: _run_test(dut) diff --git a/examples/wifi/.build-test-rules.yml b/examples/wifi/.build-test-rules.yml index 2cdebfd1af..9e3af061dd 100644 --- a/examples/wifi/.build-test-rules.yml +++ b/examples/wifi/.build-test-rules.yml @@ -29,10 +29,6 @@ examples/wifi/getting_started: <<: *wifi_depends_default disable: - if: SOC_WIFI_SUPPORTED != 1 - disable_test: - - if: IDF_TARGET not in ["esp32", "esp32c3", "esp32c2", "esp32s3"] - temporary: true - reason: lack of runners depends_filepatterns: - examples/wifi/getting_started/**/* diff --git a/examples/wifi/getting_started/pytest_wifi_getting_started.py b/examples/wifi/getting_started/pytest_wifi_getting_started.py index d6edc8a24a..4df50381ba 100644 --- a/examples/wifi/getting_started/pytest_wifi_getting_started.py +++ b/examples/wifi/getting_started/pytest_wifi_getting_started.py @@ -1,6 +1,5 @@ # SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 - import os.path from typing import Tuple @@ -23,7 +22,11 @@ from pytest_embedded_idf.dut import IdfDut @pytest.mark.esp32 @pytest.mark.esp32c3 +@pytest.mark.esp32s2 @pytest.mark.esp32s3 +@pytest.mark.esp32c5 +@pytest.mark.esp32c6 +@pytest.mark.esp32c61 @pytest.mark.wifi_two_dut @pytest.mark.parametrize( 'count, app_path', [