Changeset 83418 in vbox for trunk/src/VBox
- Timestamp:
- Mar 25, 2020 4:39:08 PM (5 years ago)
- Location:
- trunk/src/VBox/ValidationKit/testmanager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/config.py
r83415 r83418 90 90 ## File on the build binary share that can be used to check that it's mounted. 91 91 g_ksBuildBinRootFile = 'builds.txt' 92 ## Template for paratial database dump files. One argument: UID 93 g_ksTmDbDumpFileTemplate = '/var/tmp/tm-partial-db-dump-for-%u.zip' 92 ## Template for paratial database dump output files. One argument: UID 93 g_ksTmDbDumpOutFileTmpl = '/var/tmp/tm-partial-db-dump-for-%u.zip' 94 ## Template for paratial database dump temporary files. One argument: UID 95 g_ksTmDbDumpTmpFileTmpl = '/var/tmp/tm-partial-db-dump-for-%u.pgtxt' 94 96 ## @} 95 97 -
trunk/src/VBox/ValidationKit/testmanager/webui/wuiadmin.py
r83415 r83418 483 483 oFile = None; 484 484 oNow = datetime.datetime.utcnow(); 485 sTmpFile = config.g_ksTmDbDumpFileTemplate % (self._oCurUser.uid,); 485 sOutFile = config.g_ksTmDbDumpOutFileTmpl % (self._oCurUser.uid,); 486 sTmpFile = config.g_ksTmDbDumpTmpFileTmpl % (self._oCurUser.uid,); 486 487 sScript = os.path.join(config.g_ksTestManagerDir, 'db', 'partial-db-dump.py'); 487 488 try: 488 (iExitCode, sStdOut, sStdErr) = utils.processOutputUnchecked([sScript, '--days-to-dump', str(cDaysBack), 489 '-f', sTmpFile,]); 489 (iExitCode, sStdOut, sStdErr) = utils.processOutputUnchecked([ sScript, 490 '--days-to-dump', str(cDaysBack), 491 '-f', sOutFile, 492 '-t', sTmpFile, 493 ]); 490 494 if iExitCode != 0: 491 495 raise Exception('iExitCode=%s\n--- stderr ---\n%s\n--- stdout ---\n%s' % (iExitCode, sStdOut, sStdErr,)); … … 494 498 # Open and send the dump. 495 499 # 496 oFile = open(s TmpFile, 'rb');500 oFile = open(sOutFile, 'rb'); 497 501 cbFile = os.fstat(oFile.fileno()).st_size; 498 502 … … 513 517 try: oFile.close(); 514 518 except: pass; 519 utils.noxcptDeleteFile(sOutFile); 515 520 utils.noxcptDeleteFile(sTmpFile); 516 521 return self.ksDispatchRcAllDone;
Note:
See TracChangeset
for help on using the changeset viewer.