summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorYixingShen <[email protected]>2026-03-07 22:58:07 +0800
committerYixingShen <[email protected]>2026-03-07 22:58:07 +0800
commit9072d974b05e6e9a6cc426520c0b2bf96c6e7174 (patch)
tree8c0c4caff46cfdeaee612a79181d72012a74e1ba /test
parent2a0802c6a56dc3849fe21d376908aff07131a111 (diff)
parent571445d26f1484a4033b504acb7c700fde340c76 (diff)
Merge branch 'master' of https://github.com/YixingShen/tinyusb
Diffstat (limited to 'test')
-rwxr-xr-xtest/hil/hil_test.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/hil/hil_test.py b/test/hil/hil_test.py
index f3cead7a3..7cffd2da8 100755
--- a/test/hil/hil_test.py
+++ b/test/hil/hil_test.py
@@ -153,14 +153,16 @@ def open_mtp_dev(uid):
# MTP seems to take a while to enumerate
timeout = 2 * ENUM_TIMEOUT
while timeout > 0:
- # run_cmd(f"gio mount -u mtp://TinyUsb_TinyUsb_Device_{uid}/")
+ # unmount gio/gvfs MTP mount which blocks libmtp from accessing the device
+ subprocess.run(f"gio mount -u mtp://TinyUsb_TinyUsb_Device_{uid}/",
+ shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
for raw in mtp.detect_devices():
mtp.device = mtp.mtp.LIBMTP_Open_Raw_Device(ctypes.byref(raw))
if mtp.device:
sn = mtp.get_serialnumber().decode('utf-8')
- #print(f'mtp serial = {sn}')
if sn == uid:
return mtp
+ mtp.disconnect()
time.sleep(1)
timeout -= 1
return None
@@ -753,7 +755,7 @@ device_tests = [
'device/cdc_msc_freertos',
'device/hid_boot_interface',
'device/printer_to_cdc',
- # 'device/mtp'
+ 'device/mtp'
]
dual_tests = [