Changeset 79087 in vbox for trunk/src/VBox/ValidationKit/testdriver
- Timestamp:
- Jun 11, 2019 11:58:28 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 131247
- Location:
- trunk/src/VBox/ValidationKit/testdriver
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testdriver/base.py
r79067 r79087 1 1 # -*- coding: utf-8 -*- 2 2 # $Id$ 3 # pylint: disable= C03023 # pylint: disable=too-many-lines 4 4 5 5 """ … … 222 222 fRc = False; 223 223 else: 224 fRc = __processSudoKill(uPid, signal.SIGUSR1, fSudo); # pylint: disable= E1101224 fRc = __processSudoKill(uPid, signal.SIGUSR1, fSudo); # pylint: disable=no-member 225 225 return fRc; 226 226 … … 246 246 fRc = winbase.processKill(uPid); 247 247 else: 248 fRc = __processSudoKill(uPid, signal.SIGKILL, fSudo); # pylint: disable= E1101248 fRc = __processSudoKill(uPid, signal.SIGKILL, fSudo); # pylint: disable=no-member 249 249 return fRc; 250 250 … … 307 307 308 308 # ps fails with non-zero exit code if the pid wasn't found. 309 if iExitCode is not0:309 if iExitCode != 0: 310 310 return False; 311 311 if sCurName is None: … … 380 380 def __del__(self): 381 381 """In case we need it later on.""" 382 pass; 382 pass; # pylint: disable=unnecessary-pass 383 383 384 384 def toString(self): … … 395 395 def lockTask(self): 396 396 """ Wrapper around oCv.acquire(). """ 397 if True is True: # change to False for debugging deadlocks. 397 if True is True: # change to False for debugging deadlocks. # pylint: disable=comparison-with-itself 398 398 self.oCv.acquire(); 399 399 else: … … 600 600 try: 601 601 (uPid, uStatus) = os.waitpid(self.hWin, 0); 602 if uPid == self.hWin or uPid == self.uPid:602 if uPid in (self.hWin, self.uPid,): 603 603 self.hWin.Detach(); # waitpid closed it, so it's now invalid. 604 604 self.hWin = None; … … 613 613 else: 614 614 try: 615 (uPid, uStatus) = os.waitpid(self.uPid, os.WNOHANG); # pylint: disable= E1101615 (uPid, uStatus) = os.waitpid(self.uPid, os.WNOHANG); # pylint: disable=no-member 616 616 except: 617 617 reporter.logXcpt(); … … 773 773 774 774 775 class TestDriverBase(object): # pylint: disable= R0902775 class TestDriverBase(object): # pylint: disable=too-many-instance-attributes 776 776 """ 777 777 The base test driver. … … 1628 1628 1629 1629 1630 def innerMain(self, asArgs = None): # pylint: disable= R09151630 def innerMain(self, asArgs = None): # pylint: disable=too-many-statements 1631 1631 """ 1632 1632 Exception wrapped main() worker. … … 1749 1749 1750 1750 # The old, deprecated name. 1751 TestDriver = TestDriverBase; # pylint: disable= C01031751 TestDriver = TestDriverBase; # pylint: disable=invalid-name 1752 1752 1753 1753 … … 1756 1756 # 1757 1757 1758 # pylint: disable= C01111758 # pylint: disable=missing-docstring 1759 1759 class TestDriverBaseTestCase(unittest.TestCase): 1760 1760 def setUp(self): -
trunk/src/VBox/ValidationKit/testdriver/btresolver.py
r76553 r79087 1 1 # -*- coding: utf-8 -*- 2 2 # $Id$ 3 # pylint: disable= C03023 # pylint: disable=too-many-lines 4 4 5 5 """ … … 548 548 self.oResolverOs = BacktraceResolverOsLinux(self.sScratchDbgPath, self.sScratchPath, self.fnLog); 549 549 elif self.sTargetOs == 'darwin': 550 self.oResolverOs = BacktraceResolverOsDarwin(self.sScratchDbgPath, self.sScratchPath, self.fnLog); # pylint: disable= R0204550 self.oResolverOs = BacktraceResolverOsDarwin(self.sScratchDbgPath, self.sScratchPath, self.fnLog); # pylint: disable=redefined-variable-type 551 551 elif self.sTargetOs == 'solaris': 552 self.oResolverOs = BacktraceResolverOsSolaris(self.sScratchDbgPath, self.sScratchPath, self.fnLog); # pylint: disable= R0204552 self.oResolverOs = BacktraceResolverOsSolaris(self.sScratchDbgPath, self.sScratchPath, self.fnLog); # pylint: disable=redefined-variable-type 553 553 else: 554 554 self.log('The backtrace resolver is not supported on %s' % (self.sTargetOs,)); -
trunk/src/VBox/ValidationKit/testdriver/reporter.py
r78973 r79087 1 1 # -*- coding: utf-8 -*- 2 2 # $Id$ 3 # pylint: disable= C03023 # pylint: disable=too-many-lines 4 4 5 5 """ … … 677 677 if sys.version_info[0] >= 3 \ 678 678 or (sys.version_info[0] == 2 and sys.version_info[1] >= 6): 679 if self._oParsedTmUrl.scheme == 'https': # pylint: disable= E1101679 if self._oParsedTmUrl.scheme == 'https': # pylint: disable=no-member 680 680 self._fnTmConnect = lambda: httplib.HTTPSConnection(self._oParsedTmUrl.hostname, 681 681 timeout = self.kcSecTestManagerRequestTimeout); … … 684 684 timeout = self.kcSecTestManagerRequestTimeout); 685 685 else: 686 if self._oParsedTmUrl.scheme == 'https': # pylint: disable= E1101686 if self._oParsedTmUrl.scheme == 'https': # pylint: disable=no-member 687 687 self._fnTmConnect = lambda: httplib.HTTPSConnection(self._oParsedTmUrl.hostname); 688 688 else: … … 704 704 }; 705 705 self._sTmServerPath = '/%s/testboxdisp.py?%s' \ 706 % ( self._oParsedTmUrl.path.strip('/'), # pylint: disable= E1101706 % ( self._oParsedTmUrl.path.strip('/'), # pylint: disable=no-member 707 707 self._fnUrlEncode(dParams), ); 708 708 … … 1687 1687 1688 1688 cThread = 0; 1689 for idThread, oStack in sys._current_frames().items(): # >=2.5, a bit ugly - pylint: disable= W02121689 for idThread, oStack in sys._current_frames().items(): # >=2.5, a bit ugly - pylint: disable=protected-access 1690 1690 try: 1691 1691 if cThread > 0: -
trunk/src/VBox/ValidationKit/testdriver/tst-txsclient.py
r76553 r79087 69 69 return 'FAILED'; 70 70 71 def main(asArgs): # pylint: disable= C0111,R0914,R091571 def main(asArgs): # pylint: disable=missing-docstring,too-many-locals,too-many-statements 72 72 cMsTimeout = long(30*1000); 73 73 sAddress = 'localhost'; -
trunk/src/VBox/ValidationKit/testdriver/txsclient.py
r76553 r79087 1 1 # -*- coding: utf-8 -*- 2 2 # $Id$ 3 # pylint: disable= C03023 # pylint: disable=too-many-lines 4 4 5 5 """ … … 719 719 # 720 720 # Process task 721 # pylint: disable= C0111721 # pylint: disable=missing-docstring 722 722 # 723 723 724 def taskExecEx(self, sExecName, fFlags, asArgs, asAddEnv, oStdIn, oStdOut, oStdErr, oTestPipe, sAsUser): # pylint: disable= R0913,R0914,R0915,C0301724 def taskExecEx(self, sExecName, fFlags, asArgs, asAddEnv, oStdIn, oStdOut, oStdErr, oTestPipe, sAsUser): # pylint: disable=too-many-arguments,too-many-locals,too-many-statements,line-too-long 725 725 # Construct the payload. 726 726 aoPayload = [long(fFlags), '%s' % (sExecName), long(len(asArgs))]; … … 918 918 for o in (oStdIn, oStdOut, oStdErr, oTestPipe): 919 919 if o is not None and not utils.isString(o): 920 del o.uTxsClientCrc32; # pylint: disable= E1103920 del o.uTxsClientCrc32; # pylint: disable=maybe-no-member 921 921 # Make sure all files are closed 922 o.close(); # pylint: disable= E1103922 o.close(); # pylint: disable=maybe-no-member 923 923 reporter.log('taskExecEx: returns %s' % (rc)); 924 924 return rc; … … 1051 1051 def taskUploadString(self, sContent, sRemoteFile): 1052 1052 # Wrap sContent in a file like class. 1053 class InStringFile(object): # pylint: disable= R09031053 class InStringFile(object): # pylint: disable=too-few-public-methods 1054 1054 def __init__(self, sContent): 1055 1055 self.sContent = sContent; … … 1148 1148 def taskDownloadString(self, sRemoteFile, sEncoding = 'utf-8', fIgnoreEncodingErrors = True): 1149 1149 # Wrap sContent in a file like class. 1150 class OutStringFile(object): # pylint: disable= R09031150 class OutStringFile(object): # pylint: disable=too-few-public-methods 1151 1151 def __init__(self): 1152 1152 self.asContent = []; … … 1232 1232 return rc; 1233 1233 1234 # pylint: enable= C01111234 # pylint: enable=missing-docstring 1235 1235 1236 1236 … … 1310 1310 # 1311 1311 1312 def asyncExecEx(self, sExecName, asArgs = (), asAddEnv = (), # pylint: disable= R09131312 def asyncExecEx(self, sExecName, asArgs = (), asAddEnv = (), # pylint: disable=too-many-arguments 1313 1313 oStdIn = None, oStdOut = None, oStdErr = None, oTestPipe = None, 1314 1314 sAsUser = "", cMsTimeout = 3600000, fIgnoreErrors = False): … … 1339 1339 oStdOut, oStdErr, oTestPipe, sAsUser)); 1340 1340 1341 def syncExecEx(self, sExecName, asArgs = (), asAddEnv = (), # pylint: disable= R09131341 def syncExecEx(self, sExecName, asArgs = (), asAddEnv = (), # pylint: disable=too-many-arguments 1342 1342 oStdIn = '/dev/null', oStdOut = '/dev/null', 1343 1343 oStdErr = '/dev/null', oTestPipe = '/dev/null', … … 1895 1895 oWakeupW = None; 1896 1896 if hasattr(socket, 'socketpair'): 1897 try: (oWakeupR, oWakeupW) = socket.socketpair(); # pylint: disable= E11011897 try: (oWakeupR, oWakeupW) = socket.socketpair(); # pylint: disable=no-member 1898 1898 except: reporter.logXcpt('socket.socketpair() failed'); 1899 1899 -
trunk/src/VBox/ValidationKit/testdriver/vbox.py
r79056 r79087 1 1 # -*- coding: utf-8 -*- 2 2 # $Id$ 3 # pylint: disable= C03023 # pylint: disable=too-many-lines 4 4 5 5 """ … … 68 68 # 69 69 70 ComException = None; # pylint: disable= C010371 __fnComExceptionGetAttr__ = None; # pylint: disable= C010370 ComException = None; # pylint: disable=invalid-name 71 __fnComExceptionGetAttr__ = None; # pylint: disable=invalid-name 72 72 73 73 def __MyDefaultGetAttr(oSelf, sName): … … 110 110 exceptions and errors. 111 111 """ 112 global ComException # pylint: disable= C0103113 global __fnComExceptionGetAttr__ # pylint: disable= C0103112 global ComException # pylint: disable=invalid-name 113 global __fnComExceptionGetAttr__ # pylint: disable=invalid-name 114 114 115 115 # Hook up our attribute getter for the exception class (ASSUMES new-style). … … 210 210 211 211 # Reverse lookup table. 212 dDecimalToConst = {}; # pylint: disable= C0103212 dDecimalToConst = {}; # pylint: disable=invalid-name 213 213 214 214 def __init__(self): … … 329 329 330 330 331 class Build(object): # pylint: disable= R0903331 class Build(object): # pylint: disable=too-few-public-methods 332 332 """ 333 333 A VirtualBox build. … … 372 372 sSearch = os.environ.get('VBOX_TD_DEV_TREE', os.path.dirname(__file__)); # Env.var. for older trees or testboxscript. 373 373 sCandidat = None; 374 for i in range(0, 10): # pylint: disable= W0612374 for i in range(0, 10): # pylint: disable=unused-variable 375 375 sBldDir = os.path.join(sSearch, sOut); 376 376 if os.path.isdir(sBldDir): … … 453 453 self.oEventSrc = dArgs['oEventSrc']; # Console/VirtualBox for < 3.3 454 454 self.oListener = dArgs['oListener']; 455 self.fPassive = self.oListener !=None;455 self.fPassive = self.oListener is not None; 456 456 self.sName = sName 457 457 self.fShutdown = False; … … 616 616 617 617 618 # pylint: disable= C0111,R0913,W0613618 # pylint: disable=missing-docstring,too-many-arguments,unused-argument 619 619 def onMousePointerShapeChange(self, fVisible, fAlpha, xHot, yHot, cx, cy, abShape): 620 620 reporter.log2('onMousePointerShapeChange/%s' % (self.sName)); … … 657 657 reporter.log2('onShowWindow/%s' % (self.sName)); 658 658 return None; 659 # pylint: enable= C0111,R0913,W0613659 # pylint: enable=missing-docstring,too-many-arguments,unused-argument 660 660 661 661 def handleEvent(self, oEvt): … … 698 698 EventHandlerBase.__init__(self, dArgs, self.oVBox.fpApiVer, sName); 699 699 700 # pylint: disable= C0111,W0613700 # pylint: disable=missing-docstring,unused-argument 701 701 def onMachineStateChange(self, sMachineId, eState): 702 702 pass; … … 724 724 def onGuestPropertyChange(self, sMachineId, sName, sValue, sFlags): 725 725 pass; 726 # pylint: enable= C0111,W0613726 # pylint: enable=missing-docstring,unused-argument 727 727 728 728 def handleEvent(self, oEvt): … … 763 763 ConsoleEventHandlerBase.__init__(self, dArgs); 764 764 765 def onMachineStateChange(self, sMachineId, eState): # pylint: disable= W0613765 def onMachineStateChange(self, sMachineId, eState): # pylint: disable=unused-argument 766 766 """ Just interrupt the wait loop here so it can check again. """ 767 767 _ = sMachineId; _ = eState; … … 782 782 783 783 784 class TestDriver(base.TestDriver): # pylint: disable= R0902784 class TestDriver(base.TestDriver): # pylint: disable=too-many-instance-attributes 785 785 """ 786 786 This is the VirtualBox test driver. … … 846 846 847 847 # Try dev build first since that's where I'll be using it first... 848 if True is True: 848 if True is True: # pylint: disable=comparison-with-itself 849 849 try: 850 850 self.oBuild = Build(self, None); … … 1008 1008 return self.fImportedVBoxApi; 1009 1009 1010 def _startVBoxSVC(self): # pylint: disable= R09151010 def _startVBoxSVC(self): # pylint: disable=too-many-statements 1011 1011 """ Starts VBoxSVC. """ 1012 1012 assert(self.oVBoxSvcProcess is None); … … 1058 1058 sWinDbg = 'c:\\Program Files\\Debugging Tools for Windows\\windbg.exe'; 1059 1059 if not os.path.isfile(sWinDbg): sWinDbg = 'c:\\Program Files\\Debugging Tools for Windows (x64)\\windbg.exe'; 1060 if not os.path.isfile(sWinDbg): sWinDbg = 'c:\\Programme\\Debugging Tools for Windows\\windbg.exe'; # Localization rulez! pylint: disable= C03011060 if not os.path.isfile(sWinDbg): sWinDbg = 'c:\\Programme\\Debugging Tools for Windows\\windbg.exe'; # Localization rulez! pylint: disable=line-too-long 1061 1061 if not os.path.isfile(sWinDbg): sWinDbg = 'c:\\Programme\\Debugging Tools for Windows (x64)\\windbg.exe'; 1062 1062 if not os.path.isfile(sWinDbg): sWinDbg = 'windbg'; # WinDbg must be in the path; better than nothing. … … 1087 1087 self.oVBoxSvcProcess = base.Process.spawn(sVBoxSVC, sVBoxSVC, '--auto-shutdown'); # SIGUSR1 requirement. 1088 1088 try: # Try make sure we get the SIGINT and not VBoxSVC. 1089 os.setpgid(self.oVBoxSvcProcess.getPid(), 0); # pylint: disable= E11011090 os.setpgid(0, 0); # pylint: disable= E11011089 os.setpgid(self.oVBoxSvcProcess.getPid(), 0); # pylint: disable=no-member 1090 os.setpgid(0, 0); # pylint: disable=no-member 1091 1091 except: 1092 1092 reporter.logXcpt(); … … 1129 1129 # Fudge and pid file. 1130 1130 # 1131 if self.oVBoxSvcProcess !=None and not self.oVBoxSvcProcess.wait(cMsFudge):1131 if self.oVBoxSvcProcess is not None and not self.oVBoxSvcProcess.wait(cMsFudge): 1132 1132 if fWritePidFile: 1133 1133 iPid = self.oVBoxSvcProcess.getPid(); … … 1149 1149 except: pass; 1150 1150 1151 return self.oVBoxSvcProcess !=None;1151 return self.oVBoxSvcProcess is not None; 1152 1152 1153 1153 … … 1261 1261 1262 1262 try: 1263 from vboxapi import VirtualBoxManager # pylint: disable=import-error1263 from vboxapi import VirtualBoxManager; # pylint: disable=import-error 1264 1264 except: 1265 1265 reporter.logXcpt('Error importing vboxapi'); … … 1270 1270 # pylint: disable=import-error 1271 1271 if self.sHost == 'win': 1272 from pythoncom import com_error as NativeComExceptionClass # pylint: disable= E06111272 from pythoncom import com_error as NativeComExceptionClass # pylint: disable=no-name-in-module 1273 1273 import winerror as NativeComErrorClass 1274 1274 else: … … 1392 1392 if oXcpt is None: oXcpt = sys.exc_info()[1]; 1393 1393 if sys.platform == 'win32': 1394 from pythoncom import com_error as NativeComExceptionClass # pylint: disable=import-error, E06111394 from pythoncom import com_error as NativeComExceptionClass # pylint: disable=import-error,no-name-in-module 1395 1395 else: 1396 1396 from xpcom import Exception as NativeComExceptionClass # pylint: disable=import-error … … 1400 1400 """ See vboxapi. """ 1401 1401 hrXcpt = oSelf.xcptGetResult(oXcpt); 1402 return hrXcpt == hrStatus or hrXcpt == hrStatus - 0x100000000; 1402 return hrXcpt == hrStatus or hrXcpt == hrStatus - 0x100000000; # pylint: disable=consider-using-in 1403 1403 1404 1404 def _xcptToString(oSelf, oXcpt): … … 1478 1478 # Also, it keeps a number of internal objects and interfaces around to do its job, so shutting 1479 1479 # it down before we go looking for dangling interfaces is more or less required. 1480 from xpcom import _xpcom as _xpcom; # pylint: disable=import-error 1480 from xpcom import _xpcom as _xpcom; # pylint: disable=import-error,useless-import-alias 1481 1481 hrc = _xpcom.DeinitCOM(); 1482 cIfs = _xpcom._GetInterfaceCount(); # pylint: disable= W02121483 cObjs = _xpcom._GetGatewayCount(); # pylint: disable= W02121482 cIfs = _xpcom._GetInterfaceCount(); # pylint: disable=protected-access 1483 cObjs = _xpcom._GetGatewayCount(); # pylint: disable=protected-access 1484 1484 1485 1485 if cObjs == 0 and cIfs == 0: … … 1489 1489 % (cObjs, cIfs, hrc)); 1490 1490 if hasattr(_xpcom, '_DumpInterfaces'): 1491 try: _xpcom._DumpInterfaces(); # pylint: disable= W02121491 try: _xpcom._DumpInterfaces(); # pylint: disable=protected-access 1492 1492 except: reporter.logXcpt('_teardownVBoxApi: _DumpInterfaces failed'); 1493 1493 … … 1666 1666 return rc; 1667 1667 1668 def parseOption(self, asArgs, iArg): # pylint: disable= R09151668 def parseOption(self, asArgs, iArg): # pylint: disable=too-many-statements 1669 1669 if asArgs[iArg] == '--vbox-session-type': 1670 1670 iArg += 1; … … 1945 1945 return None; 1946 1946 1947 def _logVmInfoUnsafe(self, oVM): # pylint: disable= R0915,R09121947 def _logVmInfoUnsafe(self, oVM): # pylint: disable=too-many-statements,too-many-branches 1948 1948 """ 1949 1949 Internal worker for logVmInfo that is wrapped in try/except. … … 2153 2153 return True; 2154 2154 2155 def logVmInfo(self, oVM): # pylint: disable= R0915,R09122155 def logVmInfo(self, oVM): # pylint: disable=too-many-statements,too-many-branches 2156 2156 """ 2157 2157 Logs VM configuration details. … … 2194 2194 reporter.logXcpt(); 2195 2195 else: 2196 if sIdOrDesc == sId or sIdOrDesc == sDesc:2196 if sIdOrDesc in (sId, sDesc,): 2197 2197 sIdOrDesc = sId; 2198 2198 break; … … 2239 2239 return oVM; 2240 2240 except: 2241 reporter.logXcpt(); 2241 2242 raise; 2242 2243 except: … … 2259 2260 return None; 2260 2261 2261 # pylint: disable= R0913,R0914,R09152262 # pylint: disable=too-many-arguments,too-many-locals,too-many-statements 2262 2263 def createTestVM(self, 2263 2264 sName, … … 2375 2376 self.logVmInfo(oVM); # testing... 2376 2377 return oVM; 2377 # pylint: enable= R0913,R0914,R09152378 # pylint: enable=too-many-arguments,too-many-locals,too-many-statements 2378 2379 2379 2380 def createTestVmWithDefaults(self, # pylint: disable=too-many-arguments … … 2609 2610 and sCurName != '' \ 2610 2611 and base.timestampMilli() - msStart < cMsTimeout \ 2611 and ( eCurState == vboxcon.SessionState_Unlocking \ 2612 or eCurState == vboxcon.SessionState_Spawning \ 2613 or eCurState == vboxcon.SessionState_Locked): 2612 and eCurState in (vboxcon.SessionState_Unlocking, vboxcon.SessionState_Spawning, vboxcon.SessionState_Locked,): 2614 2613 self.processEvents(1000); 2615 2614 try: … … 2662 2661 return fRc; 2663 2662 2664 def startVmEx(self, oVM, fWait = True, sType = None, sName = None, asEnv = None): # pylint: disable= R0914,R09152663 def startVmEx(self, oVM, fWait = True, sType = None, sName = None, asEnv = None): # pylint: disable=too-many-locals,too-many-statements 2665 2664 """ 2666 2665 Start the VM, returning the VM session and progress object on success. … … 2758 2757 if self.fpApiVer < 4.3 \ 2759 2758 or (self.fpApiVer == 4.3 and not hasattr(self.oVBoxMgr, 'getSessionObject')): 2760 oSession = self.oVBoxMgr.mgr.getSessionObject(self.oVBox); # pylint: disable= E11012759 oSession = self.oVBoxMgr.mgr.getSessionObject(self.oVBox); # pylint: disable=no-member 2761 2760 elif self.fpApiVer < 5.2 \ 2762 2761 or (self.fpApiVer == 5.2 and hasattr(self.oVBoxMgr, 'vbox')): 2763 oSession = self.oVBoxMgr.getSessionObject(self.oVBox); # pylint: disable= E11012762 oSession = self.oVBoxMgr.getSessionObject(self.oVBox); # pylint: disable=no-member 2764 2763 else: 2765 oSession = self.oVBoxMgr.getSessionObject(); # pylint: disable=E1101,E11202764 oSession = self.oVBoxMgr.getSessionObject(); # pylint: disable=no-member,no-value-for-parameter 2766 2765 if self.fpApiVer < 3.3: 2767 2766 oProgress = self.oVBox.openRemoteSession(oSession, sUuid, sType, sEnv); … … 2775 2774 oSession = None; 2776 2775 if i >= 0: 2777 reporter.logXcpt('warning: failed to start VM "%s" ("%s") - retrying in %u secs.' % (sUuid, oVM, i)); # pylint: disable= C03012776 reporter.logXcpt('warning: failed to start VM "%s" ("%s") - retrying in %u secs.' % (sUuid, oVM, i)); # pylint: disable=line-too-long 2778 2777 self.waitOnDirectSessionClose(oVM, 5000 + i * 1000); 2779 2778 if fWait and oProgress is not None: … … 2842 2841 return oSession; 2843 2842 2844 def terminateVmBySession(self, oSession, oProgress = None, fTakeScreenshot = None): # pylint: disable= R09152843 def terminateVmBySession(self, oSession, oProgress = None, fTakeScreenshot = None): # pylint: disable=too-many-statements 2845 2844 """ 2846 2845 Terminates the VM specified by oSession and adds the release logs to … … 3291 3290 fRemoveTxs = self.addTask(oTxsSession); 3292 3291 3293 rc = fnAsync(*aArgs); # pylint: disable= W01423292 rc = fnAsync(*aArgs); # pylint: disable=star-args 3294 3293 if rc is True: 3295 3294 rc = False; … … 3325 3324 return rc; 3326 3325 3327 # pylint: disable= C01113326 # pylint: disable=missing-docstring 3328 3327 3329 3328 def txsDisconnect(self, oSession, oTxsSession, cMsTimeout = 30000, fIgnoreErrors = False): … … 3424 3423 (sRemoteFile, sRemoteDir, self.adjustTimeoutMs(cMsTimeout), fIgnoreErrors)); 3425 3424 3426 # pylint: enable= C01113425 # pylint: enable=missing-docstring 3427 3426 3428 3427 def txsCdWait(self, … … 3652 3651 return (fRc, oTxsSession); 3653 3652 3654 # pylint: disable= R0914,R09133653 # pylint: disable=too-many-locals,too-many-arguments 3655 3654 3656 3655 def txsRunTest(self, oTxsSession, sTestName, cMsTimeout, sExecName, asArgs = (), asAddEnv = (), sAsUser = ""): … … 3810 3809 return fRc; 3811 3810 3812 # pylint: enable= R0914,R09133811 # pylint: enable=too-many-locals,too-many-arguments 3813 3812 3814 3813 -
trunk/src/VBox/ValidationKit/testdriver/vboxcon.py
r76553 r79087 36 36 37 37 38 class VBoxConstantWrappingHack(object): # pylint: disable= R090338 class VBoxConstantWrappingHack(object): # pylint: disable=too-few-public-methods 39 39 """ 40 40 This is a hack to avoid the self.oVBoxMgr.constants.MachineState_Running … … 80 80 81 81 82 goHackModuleClass = VBoxConstantWrappingHack(sys.modules[__name__]); # pylint: disable= C010382 goHackModuleClass = VBoxConstantWrappingHack(sys.modules[__name__]); # pylint: disable=invalid-name 83 83 sys.modules[__name__] = goHackModuleClass; 84 84 -
trunk/src/VBox/ValidationKit/testdriver/vboxinstaller.py
r78385 r79087 837 837 """ 838 838 839 import win32com.client; # pylint: disable= F0401839 import win32com.client; # pylint: disable=import-error 840 840 win32com.client.gencache.EnsureModule('{000C1092-0000-0000-C000-000000000046}', 1033, 1, 0); 841 841 oInstaller = win32com.client.Dispatch('WindowsInstaller.Installer', -
trunk/src/VBox/ValidationKit/testdriver/vboxtestvms.py
r79071 r79087 71 71 ## @name Flags. 72 72 ## @{ 73 g_k32 = 32; # pylint: disable= C010374 g_k64 = 64; # pylint: disable= C010375 g_k32_64 = 96; # pylint: disable= C010373 g_k32 = 32; # pylint: disable=invalid-name 74 g_k64 = 64; # pylint: disable=invalid-name 75 g_k32_64 = 96; # pylint: disable=invalid-name 76 76 g_kiArchMask = 96; 77 77 g_kiNoRaw = 128; ##< No raw mode. … … 87 87 88 88 # Table translating from VM name core to a more detailed guest info. 89 # pylint: disable= C030189 # pylint: disable=line-too-long 90 90 ## @todo what's the difference between the first two columns again? 91 91 g_aaNameToDetails = \ … … 179 179 180 180 181 # pylint: enable= C0301181 # pylint: enable=line-too-long 182 182 183 183 def _intersects(asSet1, asSet2): … … 199 199 """ 200 200 201 def __init__(self, # pylint: disable= R0913201 def __init__(self, # pylint: disable=too-many-arguments 202 202 sVmName, # type: str 203 203 fGrouping = 0, # type: int … … 904 904 """ 905 905 906 def __init__(self, # pylint: disable= R0913906 def __init__(self, # pylint: disable=too-many-arguments 907 907 sVmName, # type: str 908 908 fGrouping = 0, # type: int … … 1395 1395 1396 1396 1397 def __init__(self, # pylint: disable= R09131397 def __init__(self, # pylint: disable=too-many-arguments 1398 1398 sVmName, # type: str 1399 1399 fGrouping = g_kfGrpAncient | g_kfGrpNoTxs, # type: int … … 1703 1703 return True; 1704 1704 1705 def actionExecute(self, oTestDrv, fnCallback): # pylint: disable= R09141705 def actionExecute(self, oTestDrv, fnCallback): # pylint: disable=too-many-locals 1706 1706 """ 1707 1707 For base.TestDriver.actionExecute. Calls the callback function for -
trunk/src/VBox/ValidationKit/testdriver/vboxwrappers.py
r79068 r79087 1 1 # -*- coding: utf-8 -*- 2 2 # $Id$ 3 # pylint: disable= C03023 # pylint: disable=too-many-lines 4 4 5 5 """ … … 102 102 103 103 104 class VirtualBoxWrapper(object): # pylint: disable= R0903104 class VirtualBoxWrapper(object): # pylint: disable=too-few-public-methods 105 105 """ 106 106 Wrapper around the IVirtualBox object that adds some (hopefully) useful … … 509 509 they don't throw errors. 510 510 """ 511 if True is True: 511 if True is True: # pylint: disable=comparison-with-itself 512 512 try: 513 513 iPct = self.o.operationPercent; … … 1280 1280 Helper that translate the adapter type into a driver name. 1281 1281 """ 1282 if eNicType == vboxcon.NetworkAdapterType_Am79C970A \ 1283 or eNicType == vboxcon.NetworkAdapterType_Am79C973: 1282 if eNicType in (vboxcon.NetworkAdapterType_Am79C970A, vboxcon.NetworkAdapterType_Am79C973): 1284 1283 sName = 'pcnet'; 1285 elif eNicType == vboxcon.NetworkAdapterType_I82540EM \1286 or eNicType == vboxcon.NetworkAdapterType_I82543GC \1287 or eNicType == vboxcon.NetworkAdapterType_I82545EM:1284 elif eNicType in (vboxcon.NetworkAdapterType_I82540EM, 1285 vboxcon.NetworkAdapterType_I82543GC, 1286 vboxcon.NetworkAdapterType_I82545EM): 1288 1287 sName = 'e1000'; 1289 1288 elif eNicType == vboxcon.NetworkAdapterType_Virtio: … … 1562 1561 # Resolve missing MAC address prefix by feeding in the host IP address bytes. 1563 1562 cchMacAddr = len(sMacAddr); 1564 if cchMacAddr > 0 andcchMacAddr < 12:1563 if 0 < cchMacAddr < 12: 1565 1564 sHostIP = netutils.getPrimaryHostIp(); 1566 1565 abHostIP = socket.inet_aton(sHostIP); … … 1925 1924 return oHd; 1926 1925 1927 def createAndAttachHd(self, sHd, sFmt = "VDI", sController = "IDE Controller", cb = 10*1024*1024*1024, # pylint: disable= R09131926 def createAndAttachHd(self, sHd, sFmt = "VDI", sController = "IDE Controller", cb = 10*1024*1024*1024, # pylint: disable=too-many-arguments 1928 1927 iPort = 0, iDevice = 0, fImmutable = True, cMsTimeout = 60000, tMediumVariant = None): 1929 1928 """ … … 2115 2114 return True; 2116 2115 2117 def setupPreferredConfig(self): # pylint: disable= R09142116 def setupPreferredConfig(self): # pylint: disable=too-many-locals 2118 2117 """ 2119 2118 Configures the VM according to the preferences of the guest type. … … 2180 2179 if not self.enableUsbHid(fUsbHid): fRc = False; 2181 2180 if not self.enableHpet(fHpet): fRc = False; 2182 if eStorCtlType == vboxcon.StorageControllerType_PIIX3 \2183 or eStorCtlType == vboxcon.StorageControllerType_PIIX4 \2184 or eStorCtlType == vboxcon.StorageControllerType_ICH6:2181 if eStorCtlType in (vboxcon.StorageControllerType_PIIX3, 2182 vboxcon.StorageControllerType_PIIX4, 2183 vboxcon.StorageControllerType_ICH6,): 2185 2184 if not self.setStorageControllerType(eStorCtlType, "IDE Controller"): 2186 2185 fRc = False; … … 2190 2189 return fRc; 2191 2190 2192 def addUsbDeviceFilter(self, sName, sVendorId = None, sProductId = None, sRevision = None, # pylint: disable= R09132191 def addUsbDeviceFilter(self, sName, sVendorId = None, sProductId = None, sRevision = None, # pylint: disable=too-many-arguments 2193 2192 sManufacturer = None, sProduct = None, sSerialNumber = None, 2194 2193 sPort = None, sRemote = None): … … 3033 3032 """ Class for looking for IPv4 address changes on interface 0.""" 3034 3033 def __init__(self, dArgs): 3035 vbox.VirtualBoxEventHandlerBase.__init__(self, dArgs); # pylint: disable=W02333034 vbox.VirtualBoxEventHandlerBase.__init__(self, dArgs); 3036 3035 self.oParentTask = dArgs['oParentTask']; 3037 3036 self.sMachineId = dArgs['sMachineId']; … … 3044 3043 oParentTask = self.oParentTask; 3045 3044 if oParentTask: 3046 oParentTask._setIp(sValue); # pylint: disable= W02123045 oParentTask._setIp(sValue); # pylint: disable=protected-access 3047 3046 3048 3047 -
trunk/src/VBox/ValidationKit/testdriver/winbase.py
r76553 r79087 143 143 if fRc is True: 144 144 try: 145 from win32com.client import GetObject; # pylint: disable= F0401145 from win32com.client import GetObject; # pylint: disable=import-error 146 146 oWmi = GetObject('winmgmts:'); 147 147 aoProcesses = oWmi.InstancesOf('Win32_Process');
Note:
See TracChangeset
for help on using the changeset viewer.