Skip to content

Commit 2aa9767

Browse files
committed
tests: subsys: usb: negotiated_speed: show logs from device
Wait for enumeration before checking with lsusb. Signed-off-by: Piotr Kosycarz <[email protected]>
1 parent 56c8ab9 commit 2aa9767

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/subsys/usb/negotiated_speed/pytest/test_usb_speed.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
import os
66
import subprocess
77
import sys
8+
import time
89
from typing import Dict
910

11+
from twister_harness import DeviceAdapter
12+
1013
USB_SAMPLE_ID: str = "NordicSemiconductor USBD MSC sample"
1114
packet_size_vs_speed: Dict[int, str] = {
1215
64: "Full Speed",
@@ -32,14 +35,18 @@ def excute_command(
3235
).decode(sys.getdefaultencoding())
3336

3437

35-
def test_usb_negotaited_speed():
38+
def test_usb_negotaited_speed(dut: DeviceAdapter):
3639
"""
3740
Test the USB device negotiated speed
3841
The nrf54h20 and nrf54lm20 devices
3942
must attach as High Speed USB device
4043
"""
44+
# wait for enumeration
45+
time.sleep(2)
46+
4147
usb_devices: str = excute_command("lsusb")
4248
logger.info(usb_devices)
49+
dut.readlines()
4350

4451
failure_info: str = f"{USB_SAMPLE_ID} not found in the USB devices"
4552

0 commit comments

Comments
 (0)