mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-20 08:39:05 +00:00
ci(c2/c3): add major eco version tests
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
# SPDX-FileCopyrightText: 2022-2024 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
|
||||
|
||||
@@ -61,3 +60,63 @@ def test_power_save_conn_esp32c2_26mhz(dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
peripheral.expect('connection established; status=0', timeout=30)
|
||||
output = peripheral.expect(pexpect.TIMEOUT, timeout=30)
|
||||
assert 'rst:' not in str(output) and 'boot:' not in str(output)
|
||||
|
||||
|
||||
# Case 2: BLE power save test for ESP32C2ECO4
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.xtal_26mhz
|
||||
@pytest.mark.esp32c2eco4
|
||||
@pytest.mark.parametrize(
|
||||
'config, count, target, app_path, baud',
|
||||
[
|
||||
(
|
||||
'esp32c2eco4_xtal26m',
|
||||
2,
|
||||
'esp32c2',
|
||||
f'{os.path.join(os.path.dirname(__file__), "power_save")}|{os.path.join(os.path.dirname(__file__), "blecent")}',
|
||||
'74880',
|
||||
),
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
def test_power_save_conn_esp32c2eco4(dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
peripheral = dut[0]
|
||||
central = dut[1]
|
||||
|
||||
peripheral.expect('NimBLE_BLE_PRPH: BLE Host Task Started', timeout=5)
|
||||
central.expect('NimBLE_BLE_CENT: BLE Host Task Started', timeout=5)
|
||||
peripheral.expect('Returned from app_main()', timeout=5)
|
||||
central.expect('Returned from app_main()', timeout=5)
|
||||
central.expect('Connection established', timeout=30)
|
||||
peripheral.expect('connection established; status=0', timeout=30)
|
||||
output = peripheral.expect(pexpect.TIMEOUT, timeout=30)
|
||||
assert 'rst:' not in str(output) and 'boot:' not in str(output)
|
||||
|
||||
|
||||
# Case 2: BLE power save test for ESP32C3ECO7
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.esp32c3eco7
|
||||
@pytest.mark.parametrize(
|
||||
'config, count, target, app_path',
|
||||
[
|
||||
(
|
||||
'esp32c3eco7',
|
||||
2,
|
||||
'esp32c3',
|
||||
f'{os.path.join(os.path.dirname(__file__), "power_save")}|{os.path.join(os.path.dirname(__file__), "blecent")}',
|
||||
),
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
def test_power_save_conn_esp32c3eco7(dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
peripheral = dut[0]
|
||||
central = dut[1]
|
||||
|
||||
peripheral.expect('NimBLE_BLE_PRPH: BLE Host Task Started', timeout=5)
|
||||
central.expect('NimBLE_BLE_CENT: BLE Host Task Started', timeout=5)
|
||||
peripheral.expect('Returned from app_main()', timeout=5)
|
||||
central.expect('Returned from app_main()', timeout=5)
|
||||
central.expect('Connection established', timeout=30)
|
||||
peripheral.expect('connection established; status=0', timeout=30)
|
||||
output = peripheral.expect(pexpect.TIMEOUT, timeout=30)
|
||||
assert 'rst:' not in str(output) and 'boot:' not in str(output)
|
||||
|
Reference in New Issue
Block a user