feat(ble): add esp32s31 to bluedroid BLE pytest targets

This commit is contained in:
yuanhonghui
2026-06-25 21:27:42 +08:00
parent e5d57f55b4
commit 41d4492453
7 changed files with 32 additions and 30 deletions
@@ -27,10 +27,9 @@ CUR_DIR = Path(__file__).parent.resolve()
)
@idf_parametrize(
'target',
['esp32', 'esp32c3', 'esp32c6', 'esp32c61', 'esp32c5', 'esp32h2', 'esp32s3', 'esp32h4'],
['esp32', 'esp32c3', 'esp32c6', 'esp32c61', 'esp32c5', 'esp32h2', 'esp32s3', 'esp32h4', 'esp32s31'],
indirect=['target'],
)
@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='lack of runner')
def test_gatt_write_throughput(app_path: str, dut: tuple[IdfDut, IdfDut]) -> None:
server = dut[0]
client = dut[1]
@@ -119,10 +118,9 @@ def test_c2_26mhz_xtal_write_throughput(app_path: str, dut: tuple[IdfDut, IdfDut
)
@idf_parametrize(
'target',
['esp32', 'esp32c3', 'esp32c6', 'esp32c61', 'esp32c5', 'esp32h2', 'esp32s3', 'esp32h4'],
['esp32', 'esp32c3', 'esp32c6', 'esp32c61', 'esp32c5', 'esp32h2', 'esp32s3', 'esp32h4', 'esp32s31'],
indirect=['target'],
)
@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='lack of runner')
def test_gatt_notify_throughput(app_path: str, dut: tuple[IdfDut, IdfDut]) -> None:
server = dut[0]
client = dut[1]
@@ -456,8 +456,6 @@ static void esp_gap_cb(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *par
scan_result->scan_rst.adv_data_len + scan_result->scan_rst.scan_rsp_len,
ESP_BLE_AD_TYPE_NAME_CMPL,
&adv_name_len);
ESP_LOGI(GATTC_TAG, "Scan result, device "ESP_BD_ADDR_STR", name len %u", ESP_BD_ADDR_HEX(scan_result->scan_rst.bda), adv_name_len);
ESP_LOG_BUFFER_CHAR(GATTC_TAG, adv_name, adv_name_len);
if (adv_name != NULL) {
if (strlen(remote_device_name) == adv_name_len && strncmp((char *)adv_name, remote_device_name, adv_name_len) == 0) {
// Note: If there are multiple devices with the same device name, the device may connect to an unintended one.
@@ -544,6 +542,9 @@ void app_main(void)
#if CONFIG_EXAMPLE_CI_PIPELINE_ID
memcpy(remote_device_name, esp_bluedroid_get_example_name(), sizeof(remote_device_name));
ble_scan_params.scan_interval = ESP_BLE_GAP_SCAN_ITVL_MS(50);
ble_scan_params.scan_window = ESP_BLE_GAP_SCAN_WIN_MS(50);
ble_scan_params.scan_duplicate = BLE_SCAN_DUPLICATE_ENABLE;
#endif
ESP_ERROR_CHECK(esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT));
@@ -26,10 +26,9 @@ GATT_CI_CONFIGS = ['name', 'smp_off|smp_off', 'min_bin|min_bin', 'log_off|log_of
)
@idf_parametrize(
'target',
['esp32', 'esp32c3', 'esp32c6', 'esp32c5', 'esp32h2', 'esp32s3', 'esp32c61', 'esp32h4'],
['esp32', 'esp32c3', 'esp32c6', 'esp32c5', 'esp32h2', 'esp32s3', 'esp32c61', 'esp32h4', 'esp32s31'],
indirect=['target'],
)
@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='lack of runner')
def test_gatt_func(app_path: str, dut: tuple[IdfDut, IdfDut]) -> None:
gatt_client = dut[1]
gatt_server = dut[0]
@@ -125,10 +124,9 @@ GATT_SECURITY_CI_CONFIGS = ['name', 'min_bin|min_bin', 'log_off|log_off']
)
@idf_parametrize(
'target',
['esp32', 'esp32c3', 'esp32c6', 'esp32c5', 'esp32h2', 'esp32s3', 'esp32c61', 'esp32h4'],
['esp32', 'esp32c3', 'esp32c6', 'esp32c5', 'esp32h2', 'esp32s3', 'esp32c61', 'esp32h4', 'esp32s31'],
indirect=['target'],
)
@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='lack of runner')
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]
@@ -258,10 +256,9 @@ def test_c2_26mhz_xtal_gatt_security_func(app_path: str, dut: tuple[IdfDut, IdfD
)
@idf_parametrize(
'target',
['esp32', 'esp32c3', 'esp32c6', 'esp32c5', 'esp32h2', 'esp32s3', 'esp32c61', 'esp32h4'],
['esp32', 'esp32c3', 'esp32c6', 'esp32c5', 'esp32h2', 'esp32s3', 'esp32c61', 'esp32h4', 'esp32s31'],
indirect=['target'],
)
@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='lack of runner')
def test_ble_ibeacon_func(app_path: str, dut: tuple[IdfDut, IdfDut]) -> None:
ibeacon_sender = dut[0]
ibeacon_receiver = dut[1]
@@ -339,10 +336,9 @@ def test_c2_26mhz_ble_ibeacon_func(app_path: str, dut: tuple[IdfDut, IdfDut]) ->
)
@idf_parametrize(
'target',
['esp32', 'esp32c3', 'esp32c6', 'esp32c5', 'esp32h2', 'esp32s3', 'esp32c61', 'esp32h4'],
['esp32', 'esp32c3', 'esp32c6', 'esp32c5', 'esp32h2', 'esp32s3', 'esp32c61', 'esp32h4', 'esp32s31'],
indirect=['target'],
)
@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='lack of runner')
def test_gatt_config_func(app_path: str, dut: tuple[IdfDut, IdfDut]) -> None:
gatt_client = dut[1]
gatt_server = dut[0]
@@ -429,7 +425,7 @@ def test_c2_26mhz_xtal_gatt_config_func(app_path: str, dut: tuple[IdfDut, IdfDut
@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', 'esp32h4'],
['esp32c6', 'esp32h2', 'esp32c3', 'esp32s3', 'esp32c5', 'esp32c61', 'esp32', 'esp32h4', 'esp32s31'],
indirect=['target'],
)
def test_bluedroid_host_init_deinit(dut: Dut) -> None: