mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-21 19:09:13 +00:00
test: format all test scripts
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
# 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 pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32s2'], reason='lack of runners with usb_host_flash_disk tag')
|
||||
@pytest.mark.usb_host_flash_disk
|
||||
@idf_parametrize('target', ['esp32s2', 'esp32s3', 'esp32p4'], indirect=['target'])
|
||||
def test_usb_host_msc_example(dut: Dut) -> None:
|
||||
# Get wMaxPacketSize to get USB device speed
|
||||
max_packet_size = int(dut.expect(r'wMaxPacketSize (\d{2,3})')[1].decode())
|
||||
@@ -21,10 +20,10 @@ def test_usb_host_msc_example(dut: Dut) -> None:
|
||||
read_throughput = float(dut.expect(r'example: Read speed ([0-9]*[.]?[0-9]+) MiB')[1].decode())
|
||||
|
||||
# Set write and read throughput limits
|
||||
if (max_packet_size == 512): # wMaxPacketSize = 512 for HS
|
||||
if max_packet_size == 512: # wMaxPacketSize = 512 for HS
|
||||
write_throughput_limit = 4.9
|
||||
read_throughput_limit = 11.5
|
||||
else: # wMaxPacketSize = 64 for FS
|
||||
else: # wMaxPacketSize = 64 for FS
|
||||
write_throughput_limit = 0.9
|
||||
read_throughput_limit = 1.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user