You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/09/20 05:03:28 UTC

[GitHub] [tvm] areusch commented on a change in pull request #8737: [microTVM][RVM] Skip USB device attach if device is already attached

areusch commented on a change in pull request #8737:
URL: https://github.com/apache/tvm/pull/8737#discussion_r711878555



##########
File path: apps/microtvm/reference-vm/base-box-tool.py
##########
@@ -74,10 +74,31 @@ def parse_virtualbox_devices():
     return devices
 
 
+VIRTUALBOX_USB_DEVICE_RE = (
+    "UUID:.*([0-9a-z-]{36}).*\nVendorId:.*\(([0-9A-Z]{4})\).*\nProductId:.*\(([0-9A-Z]{4})\)\n"
+)
+
+
+def parse_virtualbox_attached_usb_devices(vm_uuid):
+    output = subprocess.check_output(["VBoxManage", "showvminfo", vm_uuid], encoding="utf-8")

Review comment:
       if you use `--machinereadable` here, it should be a bit easier to parse and more robust to updates in VBoxManage. would you be up for trying that?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org