ci: rename wifi_two_dut to two_duts
This commit is contained in:
@@ -141,6 +141,8 @@ examples/bluetooth/esp_hid_host:
|
||||
- if: SOC_BT_SUPPORTED != 1
|
||||
depends_components+:
|
||||
- esp_hid
|
||||
depends_filepatterns:
|
||||
- examples/bluetooth/bluedroid/classic_bt/pytest_classic_bt_test.py
|
||||
|
||||
examples/bluetooth/hci/ble_adv_scan_combined:
|
||||
<<: *bt_default_depends
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import os.path
|
||||
import time
|
||||
from pathlib import Path
|
||||
from typing import Tuple
|
||||
|
||||
import pytest
|
||||
from pytest_embedded_idf.dut import IdfDut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
CUR_DIR = Path(__file__).parent.resolve()
|
||||
|
||||
|
||||
# Case 1: gatt write throughput test(EXAMPLE_CI_ID = 2)
|
||||
|
||||
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.parametrize(
|
||||
'count, app_path, config, erase_nvs',
|
||||
[
|
||||
(
|
||||
2,
|
||||
f'{os.path.join(os.path.dirname(__file__), "throughput_server")}|{os.path.join(os.path.dirname(__file__), "throughput_client")}',
|
||||
f'{str(CUR_DIR / "throughput_server")}|{str(CUR_DIR / "throughput_client")}',
|
||||
'write',
|
||||
'y',
|
||||
),
|
||||
@@ -54,7 +56,7 @@ def test_gatt_write_throughput(app_path: str, dut: Tuple[IdfDut, IdfDut]) -> Non
|
||||
|
||||
|
||||
# Case 2: gatt write throughput test for ESP32C2 26mhz xtal(EXAMPLE_CI_ID = 2)
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.xtal_26mhz
|
||||
@pytest.mark.parametrize(
|
||||
'count, target, baud, app_path, config, erase_nvs',
|
||||
@@ -63,7 +65,7 @@ def test_gatt_write_throughput(app_path: str, dut: Tuple[IdfDut, IdfDut]) -> Non
|
||||
2,
|
||||
'esp32c2|esp32c2',
|
||||
'74880',
|
||||
f'{os.path.join(os.path.dirname(__file__), "throughput_server")}|{os.path.join(os.path.dirname(__file__), "throughput_client")}',
|
||||
f'{str(CUR_DIR / "throughput_server")}|{str(CUR_DIR / "throughput_client")}',
|
||||
'esp32c2_xtal26m_write',
|
||||
'y',
|
||||
),
|
||||
@@ -98,13 +100,13 @@ def test_c2_26mhz_xtal_write_throughput(app_path: str, dut: Tuple[IdfDut, IdfDut
|
||||
|
||||
|
||||
# Case 3: gatt notify throughput test(EXAMPLE_CI_ID = 1)
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.parametrize(
|
||||
'count, app_path, config, erase_nvs',
|
||||
[
|
||||
(
|
||||
2,
|
||||
f'{os.path.join(os.path.dirname(__file__), "throughput_server")}|{os.path.join(os.path.dirname(__file__), "throughput_client")}',
|
||||
f'{str(CUR_DIR / "throughput_server")}|{str(CUR_DIR / "throughput_client")}',
|
||||
'notify',
|
||||
'y',
|
||||
),
|
||||
@@ -144,7 +146,7 @@ def test_gatt_notify_throughput(app_path: str, dut: Tuple[IdfDut, IdfDut]) -> No
|
||||
|
||||
|
||||
# Case 4: gatt notify throughput test for ESP32C2 26mhz xtal(EXAMPLE_CI_ID = 1)
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.xtal_26mhz
|
||||
@pytest.mark.parametrize(
|
||||
'count, target, baud, app_path, config, erase_nvs',
|
||||
@@ -153,7 +155,7 @@ def test_gatt_notify_throughput(app_path: str, dut: Tuple[IdfDut, IdfDut]) -> No
|
||||
2,
|
||||
'esp32c2|esp32c2',
|
||||
'74880',
|
||||
f'{os.path.join(os.path.dirname(__file__), "throughput_server")}|{os.path.join(os.path.dirname(__file__), "throughput_client")}',
|
||||
f'{str(CUR_DIR / "throughput_server")}|{str(CUR_DIR / "throughput_client")}',
|
||||
'esp32c2_xtal26m_notify',
|
||||
'y',
|
||||
),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import os.path
|
||||
from pathlib import Path
|
||||
from typing import Tuple
|
||||
|
||||
import pexpect
|
||||
@@ -8,17 +8,19 @@ import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.dut import IdfDut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
CUR_DIR = Path(__file__).parent.resolve()
|
||||
|
||||
|
||||
# Case 1: gatt client and gatt server test
|
||||
# EXAMPLE_CI_ID=3
|
||||
|
||||
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.parametrize(
|
||||
'count, app_path, config, erase_nvs',
|
||||
[
|
||||
(
|
||||
2,
|
||||
f'{os.path.join(os.path.dirname(__file__), "gatt_server")}|{os.path.join(os.path.dirname(__file__), "gatt_client")}',
|
||||
f'{str(CUR_DIR / "gatt_server")}|{str(CUR_DIR / "gatt_client")}',
|
||||
'name',
|
||||
'y',
|
||||
),
|
||||
@@ -61,7 +63,7 @@ def test_gatt_func(app_path: str, dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
|
||||
# Case 2: gatt client and gatt server test for ESP32C2 26mhz xtal
|
||||
# EXAMPLE_CI_ID=3
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.xtal_26mhz
|
||||
@pytest.mark.parametrize(
|
||||
'count, target, baud, app_path, config, erase_nvs',
|
||||
@@ -70,7 +72,7 @@ def test_gatt_func(app_path: str, dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
2,
|
||||
'esp32c2|esp32c2',
|
||||
'74880',
|
||||
f'{os.path.join(os.path.dirname(__file__), "gatt_server")}|{os.path.join(os.path.dirname(__file__), "gatt_client")}',
|
||||
f'{str(CUR_DIR / "gatt_server")}|{str(CUR_DIR / "gatt_client")}',
|
||||
'esp32c2_xtal26m',
|
||||
'y',
|
||||
),
|
||||
@@ -110,13 +112,13 @@ def test_c2_26mhz_xtal_gatt_func(app_path: str, dut: Tuple[IdfDut, IdfDut]) -> N
|
||||
|
||||
# Case 3: gatt security server and gatt security client test
|
||||
# EXAMPLE_CI_ID=5
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.parametrize(
|
||||
'count, app_path, config, erase_nvs',
|
||||
[
|
||||
(
|
||||
2,
|
||||
f'{os.path.join(os.path.dirname(__file__), "gatt_security_server")}|{os.path.join(os.path.dirname(__file__), "gatt_security_client")}',
|
||||
f'{str(CUR_DIR / "gatt_security_server")}|{str(CUR_DIR / "gatt_security_client")}',
|
||||
'name',
|
||||
'y',
|
||||
),
|
||||
@@ -126,7 +128,7 @@ def test_c2_26mhz_xtal_gatt_func(app_path: str, dut: Tuple[IdfDut, IdfDut]) -> N
|
||||
@idf_parametrize(
|
||||
'target', ['esp32', 'esp32c3', 'esp32c6', 'esp32c5', 'esp32h2', 'esp32s3', 'esp32c61'], indirect=['target']
|
||||
)
|
||||
def test_gatt_security_func(app_path: str, dut: Tuple[IdfDut, IdfDut], target: Tuple) -> None:
|
||||
def test_gatt_security_func(app_path: str, dut: Tuple[IdfDut, IdfDut], target: tuple) -> None:
|
||||
gatt_security_client = dut[1]
|
||||
gatt_security_server = dut[0]
|
||||
gatt_security_client_addr = (
|
||||
@@ -143,9 +145,9 @@ def test_gatt_security_func(app_path: str, dut: Tuple[IdfDut, IdfDut], target: T
|
||||
gatt_security_client.expect_exact('Scanning start successfully', timeout=30)
|
||||
gatt_security_client.expect_exact('Device found BE', timeout=30)
|
||||
# can not get rpa_address, so not check server address
|
||||
gatt_security_client.expect_exact(f'Connected, conn_id 0, remote ', timeout=30)
|
||||
gatt_security_client.expect_exact('Connected, conn_id 0, remote ', timeout=30)
|
||||
if target == ('esp32', 'esp32'):
|
||||
gatt_security_server.expect_exact(f'Connected, conn_id 0, remote', timeout=30)
|
||||
gatt_security_server.expect_exact('Connected, conn_id 0, remote', timeout=30)
|
||||
else:
|
||||
gatt_security_server.expect_exact(f'Connected, conn_id 0, remote {gatt_security_client_addr}', timeout=30)
|
||||
gatt_security_client.expect_exact('Key exchanged, key_type ESP_LE_KEY_PID', timeout=30)
|
||||
@@ -158,12 +160,12 @@ def test_gatt_security_func(app_path: str, dut: Tuple[IdfDut, IdfDut], target: T
|
||||
gatt_security_server.expect_exact('Key exchanged, key_type ESP_LE_KEY_LID', timeout=30)
|
||||
gatt_security_server.expect_exact('Key exchanged, key_type ESP_LE_KEY_PID', timeout=30)
|
||||
if target == ('esp32', 'esp32'):
|
||||
gatt_security_server.expect_exact(f'Authentication complete, addr_type 1, addr ', timeout=30)
|
||||
gatt_security_server.expect_exact('Authentication complete, addr_type 1, addr ', timeout=30)
|
||||
else:
|
||||
gatt_security_server.expect_exact(
|
||||
f'Authentication complete, addr_type 0, addr {gatt_security_client_addr}', timeout=30
|
||||
)
|
||||
gatt_security_client.expect_exact(f'Authentication complete, addr_type 1, addr ', timeout=30)
|
||||
gatt_security_client.expect_exact('Authentication complete, addr_type 1, addr ', timeout=30)
|
||||
gatt_security_server.expect_exact('Pairing successfully', timeout=30)
|
||||
gatt_security_server.expect_exact('Bonded devices number 1', timeout=30)
|
||||
gatt_security_client.expect_exact('Pairing successfully', timeout=30)
|
||||
@@ -178,7 +180,7 @@ def test_gatt_security_func(app_path: str, dut: Tuple[IdfDut, IdfDut], target: T
|
||||
|
||||
# Case 4: gatt security server and gatt security client test for ESP32C2 26mhz xtal
|
||||
# EXAMPLE_CI_ID=5
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.xtal_26mhz
|
||||
@pytest.mark.parametrize(
|
||||
'count, target, baud, app_path, config, erase_nvs',
|
||||
@@ -187,7 +189,7 @@ def test_gatt_security_func(app_path: str, dut: Tuple[IdfDut, IdfDut], target: T
|
||||
2,
|
||||
'esp32c2|esp32c2',
|
||||
'74880',
|
||||
f'{os.path.join(os.path.dirname(__file__), "gatt_security_server")}|{os.path.join(os.path.dirname(__file__), "gatt_security_client")}',
|
||||
f'{str(CUR_DIR / "gatt_security_server")}|{str(CUR_DIR / "gatt_security_client")}',
|
||||
'esp32c2_xtal26m',
|
||||
'y',
|
||||
),
|
||||
@@ -211,7 +213,7 @@ def test_c2_26mhz_xtal_gatt_security_func(app_path: str, dut: Tuple[IdfDut, IdfD
|
||||
gatt_security_client.expect_exact('Scanning start successfully', timeout=30)
|
||||
gatt_security_client.expect_exact('Device found BE', timeout=30)
|
||||
# can not get rpa_address, so not check server address
|
||||
gatt_security_client.expect_exact(f'Connected, conn_id 0, remote ', timeout=30)
|
||||
gatt_security_client.expect_exact('Connected, conn_id 0, remote ', timeout=30)
|
||||
gatt_security_server.expect_exact(f'Connected, conn_id 0, remote {gatt_security_client_addr}', timeout=30)
|
||||
gatt_security_client.expect_exact('Key exchanged, key_type ESP_LE_KEY_PID', timeout=30)
|
||||
gatt_security_client.expect_exact('Key exchanged, key_type ESP_LE_KEY_LENC', timeout=30)
|
||||
@@ -225,7 +227,7 @@ def test_c2_26mhz_xtal_gatt_security_func(app_path: str, dut: Tuple[IdfDut, IdfD
|
||||
gatt_security_server.expect_exact(
|
||||
f'Authentication complete, addr_type 0, addr {gatt_security_client_addr}', timeout=30
|
||||
)
|
||||
gatt_security_client.expect_exact(f'Authentication complete, addr_type 1, addr ', timeout=30)
|
||||
gatt_security_client.expect_exact('Authentication complete, addr_type 1, addr ', timeout=30)
|
||||
gatt_security_server.expect_exact('Pairing successfully', timeout=30)
|
||||
gatt_security_server.expect_exact('Bonded devices number 1', timeout=30)
|
||||
gatt_security_client.expect_exact('Pairing successfully', timeout=30)
|
||||
@@ -239,13 +241,13 @@ def test_c2_26mhz_xtal_gatt_security_func(app_path: str, dut: Tuple[IdfDut, IdfD
|
||||
|
||||
|
||||
# Case 5: ble ibeacon test
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.parametrize(
|
||||
'count, app_path, config, erase_nvs',
|
||||
[
|
||||
(
|
||||
2,
|
||||
f'{os.path.join(os.path.dirname(__file__), "ble_ibeacon")}|{os.path.join(os.path.dirname(__file__), "ble_ibeacon")}',
|
||||
f'{str(CUR_DIR / "ble_ibeacon")}|{str(CUR_DIR / "ble_ibeacon")}',
|
||||
'sender|receiver',
|
||||
'y',
|
||||
),
|
||||
@@ -277,7 +279,7 @@ def test_ble_ibeacon_func(app_path: str, dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
|
||||
|
||||
# Case 5: ble ibeacon test for ESP32C2 26mhz xtal
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.xtal_26mhz
|
||||
@pytest.mark.parametrize(
|
||||
'count, target, baud, app_path, config, erase_nvs',
|
||||
@@ -286,7 +288,7 @@ def test_ble_ibeacon_func(app_path: str, dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
2,
|
||||
'esp32c2|esp32c2',
|
||||
'74880',
|
||||
f'{os.path.join(os.path.dirname(__file__), "ble_ibeacon")}|{os.path.join(os.path.dirname(__file__), "ble_ibeacon")}',
|
||||
f'{str(CUR_DIR / "ble_ibeacon")}|{str(CUR_DIR / "ble_ibeacon")}',
|
||||
'esp32c2_xtal26m_sender|esp32c2_xtal26m_receiver',
|
||||
'y',
|
||||
),
|
||||
@@ -316,13 +318,13 @@ def test_c2_26mhz_ble_ibeacon_func(app_path: str, dut: Tuple[IdfDut, IdfDut]) ->
|
||||
|
||||
# Case 6: gatt client and gatt server config test
|
||||
# EXAMPLE_CI_ID=4
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.parametrize(
|
||||
'count, app_path, config, erase_nvs',
|
||||
[
|
||||
(
|
||||
2,
|
||||
f'{os.path.join(os.path.dirname(__file__), "gatt_server")}|{os.path.join(os.path.dirname(__file__), "gatt_client")}',
|
||||
f'{str(CUR_DIR / "gatt_server")}|{str(CUR_DIR / "gatt_client")}',
|
||||
'cfg_test',
|
||||
'y',
|
||||
),
|
||||
@@ -365,7 +367,7 @@ def test_gatt_config_func(app_path: str, dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
|
||||
# Case 7: gatt client and gatt server config test for ESP32C2 26mhz xtal
|
||||
# EXAMPLE_CI_ID=3
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.xtal_26mhz
|
||||
@pytest.mark.parametrize(
|
||||
'count, target, baud, app_path, config, erase_nvs',
|
||||
@@ -374,7 +376,7 @@ def test_gatt_config_func(app_path: str, dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
2,
|
||||
'esp32c2|esp32c2',
|
||||
'74880',
|
||||
f'{os.path.join(os.path.dirname(__file__), "gatt_server")}|{os.path.join(os.path.dirname(__file__), "gatt_client")}',
|
||||
f'{str(CUR_DIR / "gatt_server")}|{str(CUR_DIR / "gatt_client")}',
|
||||
'esp32c2_cfg_test',
|
||||
'y',
|
||||
),
|
||||
@@ -414,9 +416,7 @@ def test_c2_26mhz_xtal_gatt_config_func(app_path: str, dut: Tuple[IdfDut, IdfDut
|
||||
|
||||
# Case 8: BLE init deinit loop test
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config, app_path', [('init_deinit', f'{os.path.join(os.path.dirname(__file__), "gatt_client")}')], indirect=True
|
||||
)
|
||||
@pytest.mark.parametrize('config, app_path', [('init_deinit', f'{str(CUR_DIR / "gatt_client")}')], indirect=True)
|
||||
@idf_parametrize(
|
||||
'target', ['esp32c6', 'esp32h2', 'esp32c3', 'esp32s3', 'esp32c5', 'esp32c61', 'esp32'], indirect=['target']
|
||||
)
|
||||
@@ -431,12 +431,12 @@ def test_bluedroid_host_init_deinit(dut: Dut) -> None:
|
||||
|
||||
|
||||
# # Case 9: BLE init deinit loop test for ESP32C2 26mhz xtal
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.xtal_26mhz
|
||||
@pytest.mark.parametrize(
|
||||
'baud, app_path, config',
|
||||
[
|
||||
('74880', f'{os.path.join(os.path.dirname(__file__), "gatt_client")}', 'esp32c2_init_deinit'),
|
||||
('74880', f'{str(CUR_DIR / "gatt_client")}', 'esp32c2_init_deinit'),
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import os.path
|
||||
from pathlib import Path
|
||||
from typing import Tuple
|
||||
|
||||
import pytest
|
||||
from pytest_embedded_idf.dut import IdfDut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
CUR_DIR = Path(__file__).parent.resolve()
|
||||
|
||||
|
||||
# Case 1: ble50 security client and ble50 security server test
|
||||
# EXAMPLE_CI_ID=6
|
||||
|
||||
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.parametrize(
|
||||
'count, app_path, config, erase_nvs',
|
||||
[
|
||||
(
|
||||
2,
|
||||
f'{os.path.join(os.path.dirname(__file__), "ble50_security_server")}|{os.path.join(os.path.dirname(__file__), "ble50_security_client")}',
|
||||
f'{str(CUR_DIR / "ble50_security_server")}|{str(CUR_DIR / "ble50_security_client")}',
|
||||
'name',
|
||||
'y',
|
||||
),
|
||||
@@ -52,7 +54,7 @@ def test_ble50_security_func(app_path: str, dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
|
||||
# Case 2: ble50 security client and ble50 security server test for ESP32C2 26mhz xtal
|
||||
# EXAMPLE_CI_ID=6
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.xtal_26mhz
|
||||
@pytest.mark.parametrize(
|
||||
'count, target, baud, app_path, config, erase_nvs',
|
||||
@@ -61,7 +63,7 @@ def test_ble50_security_func(app_path: str, dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
2,
|
||||
'esp32c2|esp32c2',
|
||||
'74880',
|
||||
f'{os.path.join(os.path.dirname(__file__), "ble50_security_server")}|{os.path.join(os.path.dirname(__file__), "ble50_security_client")}',
|
||||
f'{str(CUR_DIR / "ble50_security_server")}|{str(CUR_DIR / "ble50_security_client")}',
|
||||
'esp32c2_xtal26m',
|
||||
'y',
|
||||
),
|
||||
@@ -96,13 +98,13 @@ def test_c2_26mhz_xtal_ble50_security_func(app_path: str, dut: Tuple[IdfDut, Idf
|
||||
|
||||
# Case 3: period_adv and period_sync test
|
||||
# EXAMPLE_CI_ID=8
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.parametrize(
|
||||
'count, app_path, config, erase_nvs',
|
||||
[
|
||||
(
|
||||
2,
|
||||
f'{os.path.join(os.path.dirname(__file__), "periodic_adv")}|{os.path.join(os.path.dirname(__file__), "periodic_sync")}',
|
||||
f'{str(CUR_DIR / "periodic_adv")}|{str(CUR_DIR / "periodic_sync")}',
|
||||
'name',
|
||||
'y',
|
||||
),
|
||||
@@ -123,14 +125,14 @@ def test_period_adv_sync_func(app_path: str, dut: Tuple[IdfDut, IdfDut]) -> None
|
||||
adv_dut.expect_exact('Periodic advertising start, status 0', timeout=30)
|
||||
sync_dut.expect_exact('Extended scanning params set, status 0', timeout=30)
|
||||
sync_dut.expect_exact('Extended scanning start, status 0', timeout=30)
|
||||
sync_dut.expect_exact(f'Create sync with the peer device BE', timeout=30)
|
||||
sync_dut.expect_exact('Create sync with the peer device BE', timeout=30)
|
||||
sync_dut.expect_exact('Periodic advertising sync establish, status 0', timeout=30)
|
||||
sync_dut.expect_exact('Periodic adv report, sync handle ', timeout=30)
|
||||
|
||||
|
||||
# Case 4: period_adv and period_sync test for ESP32C2 26mhz xtal
|
||||
# EXAMPLE_CI_ID=8
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.xtal_26mhz
|
||||
@pytest.mark.parametrize(
|
||||
'count, target, baud, app_path, config, erase_nvs',
|
||||
@@ -139,7 +141,7 @@ def test_period_adv_sync_func(app_path: str, dut: Tuple[IdfDut, IdfDut]) -> None
|
||||
2,
|
||||
'esp32c2|esp32c2',
|
||||
'74880',
|
||||
f'{os.path.join(os.path.dirname(__file__), "periodic_adv")}|{os.path.join(os.path.dirname(__file__), "periodic_sync")}',
|
||||
f'{str(CUR_DIR / "periodic_adv")}|{str(CUR_DIR / "periodic_sync")}',
|
||||
'esp32c2_xtal26m',
|
||||
'y',
|
||||
),
|
||||
@@ -159,20 +161,20 @@ def test_c2_26mhz_xtal_period_adv_sync_func(app_path: str, dut: Tuple[IdfDut, Id
|
||||
adv_dut.expect_exact('Periodic advertising start, status 0', timeout=30)
|
||||
sync_dut.expect_exact('Extended scanning params set, status 0', timeout=30)
|
||||
sync_dut.expect_exact('Extended scanning start, status 0', timeout=30)
|
||||
sync_dut.expect_exact(f'Create sync with the peer device BE', timeout=30)
|
||||
sync_dut.expect_exact('Create sync with the peer device BE', timeout=30)
|
||||
sync_dut.expect_exact('Periodic advertising sync establish, status 0', timeout=30)
|
||||
sync_dut.expect_exact('Periodic adv report, sync handle ', timeout=30)
|
||||
|
||||
|
||||
# Case 5: ble50 security client and ble50 security server config test
|
||||
# EXAMPLE_CI_ID=7
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.parametrize(
|
||||
'count, app_path, config, erase_nvs',
|
||||
[
|
||||
(
|
||||
2,
|
||||
f'{os.path.join(os.path.dirname(__file__), "ble50_security_server")}|{os.path.join(os.path.dirname(__file__), "ble50_security_client")}',
|
||||
f'{str(CUR_DIR / "ble50_security_server")}|{str(CUR_DIR / "ble50_security_client")}',
|
||||
'cfg_test',
|
||||
'y',
|
||||
),
|
||||
@@ -210,7 +212,7 @@ def test_ble50_security_config_func(app_path: str, dut: Tuple[IdfDut, IdfDut]) -
|
||||
|
||||
# Case 6: ble50 security client and ble50 security server config test for ESP32C2 26mhz xtal
|
||||
# EXAMPLE_CI_ID=7
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.xtal_26mhz
|
||||
@pytest.mark.parametrize(
|
||||
'count, target, baud, app_path, config, erase_nvs',
|
||||
@@ -219,7 +221,7 @@ def test_ble50_security_config_func(app_path: str, dut: Tuple[IdfDut, IdfDut]) -
|
||||
2,
|
||||
'esp32c2|esp32c2',
|
||||
'74880',
|
||||
f'{os.path.join(os.path.dirname(__file__), "ble50_security_server")}|{os.path.join(os.path.dirname(__file__), "ble50_security_client")}',
|
||||
f'{str(CUR_DIR / "ble50_security_server")}|{str(CUR_DIR / "ble50_security_client")}',
|
||||
'esp32c2_cfg_test',
|
||||
'y',
|
||||
),
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import os.path
|
||||
import os
|
||||
from typing import Tuple
|
||||
|
||||
import pexpect
|
||||
import pytest
|
||||
from pytest_embedded_idf.dut import IdfDut
|
||||
|
||||
|
||||
# Case 1: SPP
|
||||
|
||||
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.parametrize(
|
||||
'count, app_path, target, erase_all, config',
|
||||
[
|
||||
@@ -45,7 +44,7 @@ def test_bt_spp_only(app_path: str, dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
|
||||
|
||||
# Case 2: SPP_VFS
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.parametrize(
|
||||
'count, app_path, target, config',
|
||||
[
|
||||
@@ -74,7 +73,7 @@ def test_bt_spp_vfs(app_path: str, dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
|
||||
|
||||
# Case 3: A2DP
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.parametrize(
|
||||
'count, app_path, target, config',
|
||||
[
|
||||
@@ -101,7 +100,7 @@ def test_bt_a2dp(app_path: str, dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
|
||||
|
||||
# Case 4: HFP
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.parametrize(
|
||||
'count, app_path, target, config',
|
||||
[
|
||||
@@ -126,7 +125,7 @@ def test_bt_hfp(app_path: str, dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
|
||||
|
||||
# # Case 5: HID
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.parametrize(
|
||||
'count, app_path, target, config',
|
||||
[
|
||||
@@ -155,7 +154,7 @@ def test_bt_hid(app_path: str, dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
|
||||
|
||||
# Case 6: L2CAP
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.parametrize(
|
||||
'count, app_path, target, config',
|
||||
[
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import os.path
|
||||
from pathlib import Path
|
||||
from typing import Tuple
|
||||
|
||||
import pexpect
|
||||
import pytest
|
||||
from pytest_embedded_idf.dut import IdfDut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
CUR_DIR = Path(__file__).parent.resolve()
|
||||
|
||||
|
||||
# Case 1: BLE power save test
|
||||
|
||||
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.parametrize(
|
||||
'count, app_path',
|
||||
[
|
||||
(
|
||||
2,
|
||||
f'{os.path.join(os.path.dirname(__file__), "power_save")}|{os.path.join(os.path.dirname(__file__), "blecent")}',
|
||||
f'{str(CUR_DIR / "power_save")}|{str(CUR_DIR / "blecent")}',
|
||||
),
|
||||
],
|
||||
indirect=True,
|
||||
@@ -39,7 +41,7 @@ def test_power_save_conn(app_path: str, dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
|
||||
|
||||
# Case 2: BLE power save test for ESP32C2
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.xtal_26mhz
|
||||
@pytest.mark.parametrize(
|
||||
'config, count, app_path, baud',
|
||||
@@ -47,7 +49,7 @@ def test_power_save_conn(app_path: str, dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
(
|
||||
'esp32c2_xtal26m',
|
||||
2,
|
||||
f'{os.path.join(os.path.dirname(__file__), "power_save")}|{os.path.join(os.path.dirname(__file__), "blecent")}',
|
||||
f'{str(CUR_DIR / "power_save")}|{str(CUR_DIR / "blecent")}',
|
||||
'74880',
|
||||
),
|
||||
],
|
||||
@@ -69,7 +71,7 @@ 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.two_duts
|
||||
@pytest.mark.xtal_26mhz
|
||||
@pytest.mark.esp32c2eco4
|
||||
@pytest.mark.parametrize(
|
||||
@@ -78,7 +80,7 @@ def test_power_save_conn_esp32c2_26mhz(dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
(
|
||||
'esp32c2eco4_xtal26m',
|
||||
2,
|
||||
f'{os.path.join(os.path.dirname(__file__), "power_save")}|{os.path.join(os.path.dirname(__file__), "blecent")}',
|
||||
f'{str(CUR_DIR / "power_save")}|{str(CUR_DIR / "blecent")}',
|
||||
'74880',
|
||||
),
|
||||
],
|
||||
@@ -100,7 +102,7 @@ def test_power_save_conn_esp32c2eco4(dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
|
||||
|
||||
# Case 2: BLE power save test for ESP32C3ECO7
|
||||
@pytest.mark.wifi_two_dut
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.esp32c3eco7
|
||||
@pytest.mark.parametrize(
|
||||
'config, count, app_path',
|
||||
@@ -108,7 +110,7 @@ def test_power_save_conn_esp32c2eco4(dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
(
|
||||
'esp32c3eco7',
|
||||
2,
|
||||
f'{os.path.join(os.path.dirname(__file__), "power_save")}|{os.path.join(os.path.dirname(__file__), "blecent")}',
|
||||
f'{str(CUR_DIR / "power_save")}|{str(CUR_DIR / "blecent")}',
|
||||
),
|
||||
],
|
||||
indirect=True,
|
||||
|
||||
Reference in New Issue
Block a user