Changeset 60552 in vbox
- Timestamp:
- Apr 18, 2016 5:48:47 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/usb/tdUsb1.py
r60549 r60552 353 353 """ 354 354 # Get configured USB test devices from hostname we are running on 355 sGadgetHost, _= self.getGadgetParams(self.sHostname, sSpeed);355 sGadgetHost, uGadgetPort = self.getGadgetParams(self.sHostname, sSpeed); 356 356 357 357 oUsbGadget = usbgadget2.UsbGadget(); 358 358 reporter.log('Connecting to UTS: ' + sGadgetHost); 359 fRc = oUsbGadget.connectTo(30 * 1000, sGadgetHost );359 fRc = oUsbGadget.connectTo(30 * 1000, sGadgetHost, uPort = uGadgetPort); 360 360 if fRc is True: 361 reporter.log('Connect succeeded'); 362 self.oVBox.host.addUSBDeviceSource('USBIP', sGadgetHost, sGadgetHost + ':' + oUsbGadget.getUsbIpPort(), [], []); 363 364 # Create device filter 365 fRc = oSession.addUsbDeviceFilter('Compliance device', '0525', 'a4a0'); 361 self.oVBox.host.addUSBDeviceSource('USBIP', sGadgetHost, sGadgetHost + (':%s' % oUsbGadget.getUsbIpPort()), [], []); 362 363 # Create test device gadget and a filter to attach the device automatically. 364 fRc = oUsbGadget.impersonate(usbgadget2.g_ksGadgetImpersonationTest); 366 365 if fRc is True: 367 fRc = oUsbGadget.impersonate(usbgadget2.g_ksGadgetImpersonationTest); 366 iBusId, _ = oUsbGadget.getGadgetBusAndDevId(); 367 fRc = oSession.addUsbDeviceFilter('Compliance device', sVendorId = '0525', sProductId = 'a4a0', sPort = str(iBusId)); 368 368 if fRc is True: 369 369 370 self.sleep(1); 370 # Wait a moment to let the USB device appear 371 self.sleep(3); 371 372 372 373 # Do a rapid disconnect reconnect cycle. Wait a second before disconnecting
Note:
See TracChangeset
for help on using the changeset viewer.