mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-09 17:03:35 -09:00
support/testing: usbip: wait for the keyboard be detected
Running TestUsbIp may fail when checking if two QEMU USB Keyboards are reported by lsusb. On fast host, the second QEMU USB keyboard may not aleady detected when lsusb is executed. So wait a bit, to let the new keyboard be detected. Signed-off-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
committed by
Julien Olivain
parent
67d6e6602f
commit
933a591d8a
@@ -1,4 +1,5 @@
|
||||
import os
|
||||
import time
|
||||
|
||||
import infra.basetest
|
||||
|
||||
@@ -91,6 +92,9 @@ class TestUsbIp(infra.basetest.BRTest):
|
||||
# keyboard.
|
||||
self.assertRunOk("usbip attach --remote=127.0.0.1 --busid=1-1")
|
||||
|
||||
# Wait a bit, to let the new keyboard be detected.
|
||||
time.sleep(1)
|
||||
|
||||
# We check "lsusb" now sees exactly two QEMU USB Keyboards
|
||||
# (the original one, and a second one created by usbip).
|
||||
out, ret = self.emulator.run("lsusb")
|
||||
|
||||
Reference in New Issue
Block a user