Changeset 94129 in vbox for trunk/src/VBox/ValidationKit/testmanager/core
- Timestamp:
- Mar 8, 2022 2:57:25 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 150378
- Location:
- trunk/src/VBox/ValidationKit/testmanager/core
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/core/build.py
r93115 r94129 739 739 asOsAgnosticArch = []; 740 740 asOsNoArch = []; 741 for i in range(len(oBuildEx.oCat.asOsArches)):742 asParts = oBuildEx.oCat.asOsArches[i].split('.');741 for sOsArch in oBuildEx.oCat.asOsArches: 742 asParts = sOsArch.split('.'); 743 743 if len(asParts) != 2 or not asParts[0] or not asParts[1]: 744 744 raise self._oDb.integrityException('Bad build asOsArches value: %s (idBuild=%s idBuildCategory=%s)' 745 % ( oBuildEx.asOsArches[i], oBuildEx.idBuild, oBuildEx.idBuildCategory));745 % (sOsArch, oBuildEx.idBuild, oBuildEx.idBuildCategory)); 746 746 asOsNoArch.append(asParts[0] + '.noarch'); 747 747 asOsNoArch.append('os-agnostic.' + asParts[1]); -
trunk/src/VBox/ValidationKit/testmanager/core/report.py
r93115 r94129 1222 1222 # 1223 1223 for oSeries in oCollection.aoSeries: 1224 for i in range(len(oSeries.aiRevisions)):1225 oSeries.aoRevInfo.append(self.oCache.getVcsRevInfo(sCurRepository, oSeries.aiRevisions[i]));1224 for iRevision in oSeries.aiRevisions: 1225 oSeries.aoRevInfo.append(self.oCache.getVcsRevInfo(sCurRepository, iRevision)); 1226 1226 aoRet.append(oCollection); 1227 1227 -
trunk/src/VBox/ValidationKit/testmanager/core/restdispatcher.py
r93115 r94129 220 220 if not os.path.exists(os.path.dirname(sFile)): 221 221 os.makedirs(os.path.dirname(sFile), 0o755); 222 oFile = open(sFile, 'ab'); 223 224 # Check the size. 225 fSizeOk = True; 226 if not fIgnoreSizeCheck: 227 oStat = os.fstat(oFile.fileno()); 228 fSizeOk = oStat.st_size / (1024 * 1024) < config.g_kcMbMaxMainLog; 229 230 # Write the text. 231 if fSizeOk: 232 if sys.version_info[0] >= 3: 233 oFile.write(bytes(sText, 'utf-8')); 234 else: 235 oFile.write(sText); 236 237 # Done 238 oFile.close(); 222 223 with open(sFile, 'ab') as oFile: 224 # Check the size. 225 fSizeOk = True; 226 if not fIgnoreSizeCheck: 227 oStat = os.fstat(oFile.fileno()); 228 fSizeOk = oStat.st_size / (1024 * 1024) < config.g_kcMbMaxMainLog; 229 230 # Write the text. 231 if fSizeOk: 232 if sys.version_info[0] >= 3: 233 oFile.write(bytes(sText, 'utf-8')); 234 else: 235 oFile.write(sText); 236 239 237 return fSizeOk; 240 238 -
trunk/src/VBox/ValidationKit/testmanager/core/schedulerbeci.py
r93115 r94129 75 75 # 76 76 cMaxItems = len(oData.aoArgsVariations) * 64; 77 if cMaxItems > 1048576: 78 cMaxItems = 1048576; 77 cMaxItems = min(cMaxItems, 1048576); 79 78 80 79 aoItems = list(); -
trunk/src/VBox/ValidationKit/testmanager/core/testboxcontroller.py
r93115 r94129 327 327 if not os.path.exists(os.path.dirname(sFile)): 328 328 os.makedirs(os.path.dirname(sFile), 0o755); 329 oFile = open(sFile, 'ab'); 330 331 # Check the size. 332 fSizeOk = True; 333 if not fIgnoreSizeCheck: 334 oStat = os.fstat(oFile.fileno()); 335 fSizeOk = oStat.st_size / (1024 * 1024) < config.g_kcMbMaxMainLog; 336 337 # Write the text. 338 if fSizeOk: 339 if sys.version_info[0] >= 3: 340 oFile.write(bytes(sText, 'utf-8')); 341 else: 342 oFile.write(sText); 343 344 # Done 345 oFile.close(); 329 330 with open(sFile, 'ab') as oFile: 331 # Check the size. 332 fSizeOk = True; 333 if not fIgnoreSizeCheck: 334 oStat = os.fstat(oFile.fileno()); 335 fSizeOk = oStat.st_size / (1024 * 1024) < config.g_kcMbMaxMainLog; 336 337 # Write the text. 338 if fSizeOk: 339 if sys.version_info[0] >= 3: 340 oFile.write(bytes(sText, 'utf-8')); 341 else: 342 oFile.write(sText); 343 346 344 return fSizeOk; 347 345 -
trunk/src/VBox/ValidationKit/testmanager/core/testcase.py
r93115 r94129 902 902 dErrors = {}; 903 903 904 for iVar in range(len(self.aoTestCaseArgs)):905 oVar = copy.copy( self.aoTestCaseArgs[iVar]);904 for iVar, oVar in enumerate(self.aoTestCaseArgs): 905 oVar = copy.copy(oVar); 906 906 oVar.idTestCase = self.idTestCase; 907 907 dCurErrors = oVar.validateAndConvert(oDb, ModelDataBase.ksValidateFor_Other); … … 915 915 aoNewValues.append(oVar); 916 916 917 for iVar in range(len(self.aoTestCaseArgs)):918 sArgs = self.aoTestCaseArgs[iVar].sArgs;917 for iVar, oVar in enumerate(self.aoTestCaseArgs): 918 sArgs = oVar.sArgs; 919 919 for iVar2 in range(iVar + 1, len(self.aoTestCaseArgs)): 920 920 if self.aoTestCaseArgs[iVar2].sArgs == sArgs: -
trunk/src/VBox/ValidationKit/testmanager/core/testset.py
r93115 r94129 194 194 sFile1 = os.path.join(config.g_ksFileAreaRootDir, self.sBaseFilename + '-' + sFilename); 195 195 try: 196 oFile = open(sFile1, sMode); 196 oFile = open(sFile1, sMode); # pylint: disable=consider-using-with 197 197 return (oFile, os.fstat(oFile.fileno()).st_size, False); 198 198 except Exception as oXcpt1: … … 200 200 sFile2 = os.path.join(config.g_ksZipFileAreaRootDir, self.sBaseFilename + '.zip'); 201 201 try: 202 oZipFile = zipfile.ZipFile(sFile2, 'r'); 203 oFile = oZipFile.open(sFilename, sMode if sMode != 'rb' else 'r'); 202 oZipFile = zipfile.ZipFile(sFile2, 'r'); # pylint: disable=consider-using-with 203 oFile = oZipFile.open(sFilename, sMode if sMode != 'rb' else 'r'); # pylint: disable=consider-using-with 204 204 cbFile = oZipFile.getinfo(sFilename).file_size; 205 205 return (oFile, cbFile, True); … … 230 230 if not os.path.exists(os.path.dirname(sFile1)): 231 231 os.makedirs(os.path.dirname(sFile1), 0o755); 232 oFile = open(sFile1, sMode); 232 oFile = open(sFile1, sMode); # pylint: disable=consider-using-with 233 233 except Exception as oXcpt1: 234 234 return str(oXcpt1); -
trunk/src/VBox/ValidationKit/testmanager/core/webservergluebase.py
r93115 r94129 138 138 self._oDbgFile = sys.stderr; 139 139 if config.g_ksSrvGlueDebugLogDst is not None and config.g_kfSrvGlueDebug is True: 140 self._oDbgFile = open(config.g_ksSrvGlueDebugLogDst, 'a'); 140 self._oDbgFile = open(config.g_ksSrvGlueDebugLogDst, 'a'); # pylint: disable=consider-using-with 141 141 if config.g_kfSrvGlueCgiDumpArgs: 142 142 self._oDbgFile.write('Arguments: %s\nEnvironment:\n' % (sys.argv,)); … … 303 303 """ 304 304 if self._fHeaderWrittenOut is False: 305 for sKey in self._dHeaderFields:306 self._writeHeader('%s: %s\n' % (sKey, s elf._dHeaderFields[sKey]));305 for sKey, sValue in self._dHeaderFields.items(): 306 self._writeHeader('%s: %s\n' % (sKey, sValue,)); 307 307 self._fHeaderWrittenOut = True; 308 308 self._writeHeader('\n'); # End of header indicator. … … 462 462 463 463 try: 464 oFile = open(sLogFile, 'w'); 465 oFile.write(sError + '\n\n'); 466 if aXcptInfo[0] is not None: 467 oFile.write(' B a c k t r a c e\n'); 468 oFile.write('===================\n'); 469 oFile.write(cgitb.text(aXcptInfo, 5)); 470 oFile.write('\n\n'); 471 472 oFile.write(' D e b u g I n f o\n'); 473 oFile.write('=====================\n\n'); 474 self._fHtmlDebugOutput = False; 475 self.debugDumpStuff(oFile.write); 476 477 oFile.close(); 464 with open(sLogFile, 'w') as oFile: 465 oFile.write(sError + '\n\n'); 466 if aXcptInfo[0] is not None: 467 oFile.write(' B a c k t r a c e\n'); 468 oFile.write('===================\n'); 469 oFile.write(cgitb.text(aXcptInfo, 5)); 470 oFile.write('\n\n'); 471 472 oFile.write(' D e b u g I n f o\n'); 473 oFile.write('=====================\n\n'); 474 self._fHtmlDebugOutput = False; 475 self.debugDumpStuff(oFile.write); 478 476 except: 479 477 fRc = False;
Note:
See TracChangeset
for help on using the changeset viewer.