Changeset 60488 in vbox for trunk/src/VBox/ValidationKit/tests/usb/usbgadget.py
- Timestamp:
- Apr 14, 2016 10:33:11 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/usb/usbgadget.py
r59884 r60488 30 30 __version__ = "$Revision$" 31 31 32 import time; 32 33 33 34 # Validation Kit imports. … … 150 151 sPath = '/sys/class/udc/' + sUdcFile + '/soft_connect'; 151 152 152 return self._execLocallyOrThroughTxs('/usr/bin/sh', ('-c', 'echo ' + sAction + ' > ' + sPath));153 return self._execLocallyOrThroughTxs('/usr/bin/sh', ('-c', 'echo ' + sAction + ' > ' + sPath)); 153 154 154 155 def _prepareGadget(self): … … 192 193 self.sImpersonation = sImpersonation; 193 194 194 if sImpersonation == g_ksGadgetImpersonationInvalid: 195 return False; 196 elif sImpersonation == g_ksGadgetImpersonationTest: 197 return self._loadModule('g_zero'); 195 fRc = False; 196 if sImpersonation == g_ksGadgetImpersonationTest: 197 fRc = self._loadModule('g_zero'); 198 198 elif sImpersonation == g_ksGadgetImpersonationMsd: 199 199 # @todo: Not complete 200 returnself._loadModule('g_mass_storage');200 fRc = self._loadModule('g_mass_storage'); 201 201 elif sImpersonation == g_ksGadgetImpersonationWebcam: 202 202 # @todo: Not complete 203 returnself._loadModule('g_webcam');203 fRc = self._loadModule('g_webcam'); 204 204 elif sImpersonation == g_ksGadgetImpersonationEther: 205 returnself._loadModule('g_ether');205 fRc = self._loadModule('g_ether'); 206 206 else: 207 207 reporter.log('Invalid impersonation'); 208 208 209 return False; 209 if fRc and self.sGadgetType is g_ksGadgetTypeDummyHcd and self.oTxsSession is not None: 210 time.sleep(2); # Fudge 211 # For the dummy HCD over USB/IP case we have to bind the device to the USB/IP server 212 self._execLocallyOrThroughTxs('/usr/bin/sh', ('-c', '/usr/bin/usbip bind -b 3-1')); 213 214 return fRc; 210 215 211 216 def connectTo(self, cMsTimeout, sGadgetType, fUseTxs, sHostname, uPort = None):
Note:
See TracChangeset
for help on using the changeset viewer.