ci(c2/c3): add major eco version tests

This commit is contained in:
luaijun
2025-03-07 10:53:08 +08:00
parent 8bb65e6d85
commit 2f749a21e7
28 changed files with 380 additions and 14 deletions

View File

@@ -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: CC0-1.0
import os.path
from typing import Tuple
@@ -69,3 +68,65 @@ def test_wifi_getting_started_esp32c2_xtal_26mhz(dut: Tuple[IdfDut, IdfDut]) ->
station.expect(f'{tag}: got ip:', timeout=60)
station.expect(f'{tag}: connected to ap SSID:{ssid} password:{password}', timeout=60)
softap.expect('station .+ join, AID=', timeout=60)
@pytest.mark.wifi_two_dut
@pytest.mark.xtal_26mhz
@pytest.mark.esp32c2eco4
@pytest.mark.parametrize(
'count, config, target, baud, app_path',
[
(
2,
'esp32c2eco4_xtal26m',
'esp32c2',
'74880',
f'{os.path.join(os.path.dirname(__file__), "softAP")}|{os.path.join(os.path.dirname(__file__), "station")}',
),
],
indirect=True,
)
def test_wifi_getting_started_esp32c2eco4_xtal_26mhz(dut: Tuple[IdfDut, IdfDut]) -> None:
softap = dut[0]
station = dut[1]
assert station.app.sdkconfig['ESP_WIFI_SOFTAP_SUPPORT'] is False
ssid = softap.app.sdkconfig.get('ESP_WIFI_SSID')
password = softap.app.sdkconfig.get('ESP_WIFI_PASSWORD')
assert station.app.sdkconfig.get('ESP_WIFI_SSID') == ssid
assert station.app.sdkconfig.get('ESP_WIFI_PASSWORD') == password
tag = 'wifi station'
station.expect(f'{tag}: got ip:', timeout=60)
station.expect(f'{tag}: connected to ap SSID:{ssid} password:{password}', timeout=60)
softap.expect('station .+ join, AID=', timeout=60)
@pytest.mark.wifi_two_dut
@pytest.mark.esp32c3eco7
@pytest.mark.parametrize(
'count, config, target, app_path',
[
(
2,
'esp32c3eco7',
'esp32c3',
f'{os.path.join(os.path.dirname(__file__), "softAP")}|{os.path.join(os.path.dirname(__file__), "station")}',
),
],
indirect=True,
)
def test_wifi_getting_started_esp32c3eco7(dut: Tuple[IdfDut, IdfDut]) -> None:
softap = dut[0]
station = dut[1]
assert station.app.sdkconfig['ESP_WIFI_SOFTAP_SUPPORT'] is False
ssid = softap.app.sdkconfig.get('ESP_WIFI_SSID')
password = softap.app.sdkconfig.get('ESP_WIFI_PASSWORD')
assert station.app.sdkconfig.get('ESP_WIFI_SSID') == ssid
assert station.app.sdkconfig.get('ESP_WIFI_PASSWORD') == password
tag = 'wifi station'
station.expect(f'{tag}: got ip:', timeout=60)
station.expect(f'{tag}: connected to ap SSID:{ssid} password:{password}', timeout=60)
softap.expect('station .+ join, AID=', timeout=60)

View File

@@ -0,0 +1,2 @@
CONFIG_IDF_TARGET="esp32c3"
CONFIG_ESP32C3_REV_MIN_101=y

View File

@@ -0,0 +1,3 @@
CONFIG_IDF_TARGET="esp32c2"
CONFIG_XTAL_FREQ_26=y
CONFIG_ESP32C2_REV_MIN_200=y

View File

@@ -0,0 +1,2 @@
CONFIG_IDF_TARGET="esp32c3"
CONFIG_ESP32C3_REV_MIN_101=y

View File

@@ -0,0 +1,3 @@
CONFIG_IDF_TARGET="esp32c2"
CONFIG_XTAL_FREQ_26=y
CONFIG_ESP32C2_REV_MIN_200=y

View File

@@ -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
import logging
@@ -74,3 +74,30 @@ def test_wifi_power_save_pd_top(dut: Dut) -> None:
)
def test_wifi_power_save_esp32c2_26mhz(dut: Dut) -> None:
_run_test(dut)
@pytest.mark.wifi_ap
@pytest.mark.xtal_26mhz
@pytest.mark.esp32c2eco4
@pytest.mark.parametrize(
'config, baud, target',
[
('c2eco4_xtal26m', '74880', 'esp32c2'),
],
indirect=True,
)
def test_wifi_power_save_esp32c2eco4_26mhz(dut: Dut) -> None:
_run_test(dut)
@pytest.mark.wifi_ap
@pytest.mark.esp32c3eco7
@pytest.mark.parametrize(
'config, target',
[
('c3eco7','esp32c3')
],
indirect=True,
)
def test_wifi_power_save_esp32c3eco7(dut: Dut) -> None:
_run_test(dut)

View File

@@ -0,0 +1,4 @@
CONFIG_IDF_TARGET="esp32c2"
CONFIG_XTAL_FREQ_26=y
CONFIG_EXAMPLE_GET_AP_INFO_FROM_STDIN=y
CONFIG_ESP32C2_REV_MIN_200=y

View File

@@ -0,0 +1,3 @@
CONFIG_IDF_TARGET="esp32c3"
CONFIG_ESP32C3_REV_MIN_101=y
CONFIG_EXAMPLE_GET_AP_INFO_FROM_STDIN=y