Changeset 79092 in vbox for trunk/src/VBox/ValidationKit/testmanager
- Timestamp:
- Jun 11, 2019 3:26:40 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 131252
- Location:
- trunk/src/VBox/ValidationKit/testmanager
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/batch/virtual_test_sheriff.py
r79087 r79092 50 50 51 51 if sys.version_info[0] >= 3: 52 from io import StringIO as StringIO; # pylint: disable=import-error,no-name-in-module 52 from io import StringIO as StringIO; # pylint: disable=import-error,no-name-in-module,useless-import-alias 53 53 else: 54 from StringIO import StringIO as StringIO; # pylint: disable=import-error,no-name-in-module 54 from StringIO import StringIO as StringIO; # pylint: disable=import-error,no-name-in-module,useless-import-alias 55 55 from optparse import OptionParser; # pylint: disable=deprecated-module 56 56 from PIL import Image; # pylint: disable=import-error … … 1027 1027 # ( Whether to stop on hit, reason tuple, needle text. ) 1028 1028 ( True, ktReason_Panic_HugeMemory, 'mm/huge_memory.c:1988' ), 1029 ( True, ktReason_Panic_IOAPICDoesntWork, 'IO-APIC + timer doesn ''t work' ),1029 ( True, ktReason_Panic_IOAPICDoesntWork, 'IO-APIC + timer doesn\'t work' ), 1030 1030 ( True, ktReason_Panic_TxUnitHang, 'Detected Tx Unit Hang' ), 1031 1031 ( True, ktReason_GuestBug_CompizVBoxQt, 'error 4 in libQt5CoreVBox' ), -
trunk/src/VBox/ValidationKit/testmanager/cgi/logout.py
r76553 r79092 50 50 oSrvGlue = WebServerGlueCgi(g_ksValidationKitDir, fHtmlOutput = True) 51 51 sUser = oSrvGlue.getLoginName() 52 if sUser != oSrvGlue.ksUnknownUser and sUser != 'logout':52 if sUser not in (oSrvGlue.ksUnknownUser, 'logout'): 53 53 oSrvGlue.write('<p>Broken apache config!\n' 54 54 'The logout.py script should be configured with .htaccess-logout and require user logout!</p>') -
trunk/src/VBox/ValidationKit/testmanager/core/build.py
r79087 r79092 725 725 726 726 for aoRow in aaoRows: 727 oBuildExRet = BuildDataEx().initFromDbRow( self,aoRow);727 oBuildExRet = BuildDataEx().initFromDbRow(aoRow); 728 728 if not self.isBuildBlacklisted(oBuildExRet): 729 729 return oBuildExRet; -
trunk/src/VBox/ValidationKit/testmanager/core/buildblacklist.py
r79087 r79092 53 53 ksParam_iLastRevision = 'BuildBlacklist_iLastRevision' 54 54 55 kasAllowNullAttributes 56 57 58 59 60 55 kasAllowNullAttributes = [ 'idBlacklisting', 56 'tsEffective', 57 'tsExpire', 58 'uidAuthor', 59 'asTypes', 60 'asOsArches' ]; 61 61 62 62 def __init__(self): -
trunk/src/VBox/ValidationKit/testmanager/core/buildsource.py
r79087 r79092 128 128 aoNilValues, fAllowNull, oDb); 129 129 if sError is None: 130 if len(self.asTypes) <= 0:130 if not self.asTypes: 131 131 oNewValue = None; 132 132 else: -
trunk/src/VBox/ValidationKit/testmanager/core/db.py
r79087 r79092 66 66 ## @todo detect strings as well. 67 67 return False; 68 return getattr(oValue, 'pydatetime', None) !=None;68 return getattr(oValue, 'pydatetime', None) is not None; 69 69 70 70 def dbTimestampToDatetime(oValue): … … 127 127 Otherwise, we won't be able to log the issue. 128 128 """ 129 pass; 129 pass; # pylint: disable=unnecessary-pass 130 130 131 131 -
trunk/src/VBox/ValidationKit/testmanager/core/schedulerbase.py
r79087 r79092 787 787 oTestSet = TestSetData().initFromDbWithId(oDb, idTestSet); 788 788 oTestBox = TestBoxData().initFromDbWithGenId(oDb, oTestSet.idGenTestBox); 789 oTestEx = TestCaseArgsDataEx().initFromDbWithGenId(oDb, oTestSet.idGenTestCaseArgs); 789 oTestEx = TestCaseArgsDataEx().initFromDbWithGenIdEx(oDb, oTestSet.idGenTestCaseArgs, 790 tsConfigEff = oTestSet.tsConfig, 791 tsRsrcEff = oTestSet.tsConfig); 790 792 oBuild = BuildDataEx().initFromDbWithId(oDb, oTestSet.idBuild); 791 793 oValidationKitBuild = None; … … 1478 1480 , (oTestSetData.idTestSetGangLeader,) ); 1479 1481 oTask = SchedQueueData().initFromDbRow(oDb.fetchOne()); 1480 oTestEx = TestCaseArgsDataEx().initFromDbWithGenId(oDb, oTask.idGenTestCaseArgs); 1481 1482 oTestEx = TestCaseArgsDataEx().initFromDbWithGenIdEx(oDb, oTask.idGenTestCaseArgs, 1483 tsConfigEff = oTask.tsConfig, 1484 tsRsrcEff = oTask.tsConfig); 1482 1485 oDb.execute('UPDATE SchedQueues\n' 1483 1486 ' SET idItem = NEXTVAL(\'SchedQueueItemIdSeq\'),\n' … … 1490 1493 return True; 1491 1494 1492 elif oStatusData.enmState == TestBoxStatusData.ksTestBoxState_GangGatheringTimedOut:1495 if oStatusData.enmState == TestBoxStatusData.ksTestBoxState_GangGatheringTimedOut: 1493 1496 oDb.rollback(); 1494 1497 return True; -
trunk/src/VBox/ValidationKit/testmanager/core/testcaseargs.py
r79087 r79092 351 351 def addTestCaseArgs(self, oTestCaseArgsData): 352 352 """Add Test Case Args record into DB""" 353 pass 353 pass; # pylint: disable=unnecessary-pass 354 354 355 355 def cachedLookup(self, idTestCaseArgs): -
trunk/src/VBox/ValidationKit/testmanager/core/testresults.py
r79087 r79092 671 671 class TestResultHangingOffence(TMExceptionBase): 672 672 """Hanging offence committed by test case.""" 673 pass; 673 pass; # pylint: disable=unnecessary-pass 674 674 675 675 … … 2728 2728 2729 2729 elif sName == 'PopHint': 2730 if len(aaiHints) < 1:2730 if not aaiHints: 2731 2731 return 'No hint to pop.' 2732 2732 -
trunk/src/VBox/ValidationKit/testmanager/core/webservergluebase.py
r76553 r79092 45 45 For exceptions raised by glue code. 46 46 """ 47 pass; 47 pass; # pylint: disable=unnecessary-pass 48 48 49 49 … … 153 153 Note! This includes both a leading an trailing slash. 154 154 """ 155 sPath = self.getUrlPath(); 155 sPath = self.getUrlPath(); # virtual method # pylint: disable=assignment-from-no-return 156 156 iLastSlash = sPath.rfind('/'); 157 157 if iLastSlash >= 0: -
trunk/src/VBox/ValidationKit/testmanager/webui/wuibase.py
r79087 r79092 53 53 For exceptions raised by Web UI code. 54 54 """ 55 pass; 55 pass; # pylint: disable=unnecessary-pass 56 56 57 57 … … 410 410 # HACK: Checkboxes doesn't return a value when unchecked, so we always 411 411 # provide a default when dealing with boolean parameters. 412 return sValue == 'True' or sValue == 'true' or sValue == '1';412 return sValue in ('True', 'true', '1',); 413 413 414 414 def getIntParam(self, sName, iMin = None, iMax = None, iDefault = None): … … 547 547 oListEntryTestCaseArgs = [] 548 548 for idTestCaseArgs in aiAllTestCaseArgs: 549 fArgsChecked = True if idTestCaseArgs in aiCheckedTestCaseArgs else False549 fArgsChecked = idTestCaseArgs in aiCheckedTestCaseArgs; 550 550 551 551 # Dry run … … 562 562 sTestCaseName = self.getStringParam('%s[%d][sName]' % (sName, idTestCase), sDefault='') 563 563 564 oListEntryTestCase = \ 565 (idTestCase, 566 True if idTestCase in aiSelectedTestCaseIds else False, 567 sTestCaseName, 568 oListEntryTestCaseArgs) 564 oListEntryTestCase = ( 565 idTestCase, 566 idTestCase in aiSelectedTestCaseIds, 567 sTestCaseName, 568 oListEntryTestCaseArgs 569 ); 569 570 570 571 aoListOfTestCases.append(oListEntryTestCase) -
trunk/src/VBox/ValidationKit/testmanager/webui/wuicontentbase.py
r79087 r79092 54 54 def __init__(self): 55 55 """Dummy init to shut up pylint.""" 56 pass; 56 pass; # pylint: disable=unnecessary-pass 57 57 58 58 def toHtml(self): … … 732 732 aoRet = [] 733 733 for sListItem in asListItems: 734 fEnabled = True if sListItem in asSelectedItems else False734 fEnabled = sListItem in asSelectedItems; 735 735 aoRet.append((sListItem, fEnabled, sListItem)) 736 736 return aoRet -
trunk/src/VBox/ValidationKit/testmanager/webui/wuigraphwiz.py
r76553 r79092 205 205 # Must be at least two series for something to be splittable. 206 206 if len(aoSeries) <= 1: 207 if len(aoSeries) < 1:207 if not aoSeries: 208 208 return []; 209 209 return [aoSeries,]; -
trunk/src/VBox/ValidationKit/testmanager/webui/wuihlpgraphgooglechart.py
r79087 r79092 42 42 class WuiHlpGraphGoogleChartsBase(WuiHlpGraphBase): 43 43 """ Base class for the Google Charts graphs. """ 44 pass; 44 pass; # pylint: disable=unnecessary-pass 45 45 46 46 -
trunk/src/VBox/ValidationKit/testmanager/webui/wuihlpgraphmatplotlib.py
r79087 r79092 33 33 import sys; 34 34 if sys.version_info[0] >= 3: 35 from io import StringIO as StringIO; # pylint: disable=import-error,no-name-in-module 35 from io import StringIO as StringIO; # pylint: disable=import-error,no-name-in-module,useless-import-alias 36 36 else: 37 from StringIO import StringIO as StringIO; # pylint: disable=import-error,no-name-in-module 37 from StringIO import StringIO as StringIO; # pylint: disable=import-error,no-name-in-module,useless-import-alias 38 38 39 39 import matplotlib; # pylint: disable=import-error -
trunk/src/VBox/ValidationKit/testmanager/webui/wuihlpgraphsimple.py
r76553 r79092 148 148 """ 149 149 150 pass; 150 pass; # pylint: disable=unnecessary-pass 151 151 -
trunk/src/VBox/ValidationKit/testmanager/webui/wuimain.py
r79087 r79092 759 759 oTrLogic = TestResultLogic(self._oDb); 760 760 sAltSelectorAction = None; 761 if enmResultsGroupingType == TestResultLogic.ksResultsGroupingTypeNone \ 762 or enmResultsGroupingType == TestResultLogic.ksResultsGroupingTypeTestBox: 761 if enmResultsGroupingType in (TestResultLogic.ksResultsGroupingTypeNone, TestResultLogic.ksResultsGroupingTypeTestBox,): 763 762 aoTmp = oTrLogic.getTestBoxes(tsNow = tsEffective, sPeriod = sCurPeriod) 764 aoGroupMembers = sorted(list( set([ (x.idTestBox, '%s (%s)' % (x.sName, str(x.ip))) for x in aoTmp ])),763 aoGroupMembers = sorted(list({(x.idTestBox, '%s (%s)' % (x.sName, str(x.ip))) for x in aoTmp }), 765 764 reverse = False, key = lambda asData: asData[1]) 766 765 … … 774 773 elif enmResultsGroupingType == TestResultLogic.ksResultsGroupingTypeTestGroup: 775 774 aoTmp = oTrLogic.getTestGroups(tsNow = tsEffective, sPeriod = sCurPeriod); 776 aoGroupMembers = sorted(list( set([ (x.idTestGroup, x.sName ) for x in aoTmp ])),775 aoGroupMembers = sorted(list({ (x.idTestGroup, x.sName ) for x in aoTmp }), 777 776 reverse = False, key = lambda asData: asData[1]) 778 777 self._sPageTitle = 'Grouped by Test Group' … … 780 779 elif enmResultsGroupingType == TestResultLogic.ksResultsGroupingTypeBuildRev: 781 780 aoTmp = oTrLogic.getBuilds(tsNow = tsEffective, sPeriod = sCurPeriod) 782 aoGroupMembers = sorted(list( set([ (x.iRevision, '%s.%d' % (x.oCat.sBranch, x.iRevision)) for x in aoTmp ])),781 aoGroupMembers = sorted(list({ (x.iRevision, '%s.%d' % (x.oCat.sBranch, x.iRevision)) for x in aoTmp }), 783 782 reverse = True, key = lambda asData: asData[0]) 784 783 self._sPageTitle = 'Grouped by Build' … … 786 785 elif enmResultsGroupingType == TestResultLogic.ksResultsGroupingTypeBuildCat: 787 786 aoTmp = oTrLogic.getBuildCategories(tsNow = tsEffective, sPeriod = sCurPeriod) 788 aoGroupMembers = sorted(list( set([ ( x.idBuildCategory, '%s / %s / %s / %s'789 790 for x in aoTmp ])),787 aoGroupMembers = sorted(list({ (x.idBuildCategory, 788 '%s / %s / %s / %s' % ( x.sProduct, x.sBranch, ', '.join(x.asOsArches), x.sType) ) 789 for x in aoTmp }), 791 790 reverse = True, key = lambda asData: asData[1]); 792 791 self._sPageTitle = 'Grouped by Build Category' … … 794 793 elif enmResultsGroupingType == TestResultLogic.ksResultsGroupingTypeTestCase: 795 794 aoTmp = oTrLogic.getTestCases(tsNow = tsEffective, sPeriod = sCurPeriod) 796 aoGroupMembers = sorted(list( set([ (x.idTestCase, '%s' % x.sName) for x in aoTmp ])),795 aoGroupMembers = sorted(list({ (x.idTestCase, '%s' % x.sName) for x in aoTmp }), 797 796 reverse = False, key = lambda asData: asData[1]) 798 797 self._sPageTitle = 'Grouped by Test Case' … … 810 809 elif enmResultsGroupingType == TestResultLogic.ksResultsGroupingTypeSchedGroup: 811 810 aoTmp = oTrLogic.getSchedGroups(tsNow = tsEffective, sPeriod = sCurPeriod) 812 aoGroupMembers = sorted(list( set([ (x.idSchedGroup, '%s' % x.sName) for x in aoTmp ])),811 aoGroupMembers = sorted(list({ (x.idSchedGroup, '%s' % x.sName) for x in aoTmp }), 813 812 reverse = False, key = lambda asData: asData[1]) 814 813 self._sPageTitle = 'Grouped by Scheduling Group' -
trunk/src/VBox/ValidationKit/testmanager/webui/wuireport.py
r79087 r79092 91 91 Returns HTML. 92 92 """ 93 assert sWhere == 'top' or sWhere == 'bottom';93 assert sWhere in ('top', 'bottom',); 94 94 95 95 return '';
Note:
See TracChangeset
for help on using the changeset viewer.