vbox的更動 62072 路徑 trunk/src/VBox/ValidationKit
- 時間撮記:
- 2016-7-6 下午04:03:29 (8 年 以前)
- 位置:
- trunk/src/VBox/ValidationKit/testboxscript
- 檔案:
-
- 修改 2 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/ValidationKit/testboxscript/testboxscript_real.py
r61988 r62072 662 662 return self._sTestBoxName; 663 663 664 def reinitScratch(self, fnLog = testboxcommons.log, fUseTheForce = None):664 def _reinitScratch(self, fnLog, fUseTheForce): 665 665 """ 666 666 Wipes the scratch directories and re-initializes them. … … 742 742 return oRc.fRc; 743 743 744 def reinitScratch(self, fnLog = testboxcommons.log, fUseTheForce = None, cRetries = 0, cMsDelay = 5000): 745 """ 746 Wipes the scratch directories and re-initializes them. 747 748 Will retry according to the cRetries and cMsDelay parameters. Windows 749 forces us to apply this hack as it ships with services asynchronously 750 scanning files after they execute, thus racing us cleaning up after a 751 test. On testboxwin3 we had frequent trouble with aelupsvc.dll keeping 752 vts_rm.exe kind of open, somehow preventing us from removing the 753 directory containing it, despite not issuing any errors deleting the 754 file itself. The service is called "Application Experience", which 755 feels like a weird joke here. 756 757 No exceptions raise, returns success indicator instead. 758 """ 759 fRc = self._reinitScratch(fnLog, fUseTheForce) 760 while fRc is False and cRetries > 0: 761 time.sleep(cMsDelay / 1000.0); 762 fnLog('reinitScratch: Retrying...'); 763 fRc = self._reinitScratch(fnLog, fUseTheForce) 764 cRetries -= 1; 765 return fRc; 766 767 744 768 def _doSignOn(self): 745 769 """ … … 791 815 792 816 # Set up the scratch area. 793 self.reinitScratch(fUseTheForce = self._fFirstSignOn );817 self.reinitScratch(fUseTheForce = self._fFirstSignOn, cRetries = 2); 794 818 795 819 self._fFirstSignOn = False; … … 856 880 857 881 # Automatically reboot if scratch init fails. 858 if self._cReinitScratchErrors > 8 and self.reinitScratch( ) is False:882 if self._cReinitScratchErrors > 8 and self.reinitScratch(cRetries = 3) is False: 859 883 testboxcommons.log('Scratch does not initialize cleanly after %d attempts, rebooting...' 860 884 % ( self._cReinitScratchErrors, )); -
trunk/src/VBox/ValidationKit/testboxscript/testboxtasks.py
r62024 r62072 592 592 593 593 # 594 # Wipe the stuff clean. On failure, delay for a total of 20 seconds while 595 # periodically retrying the cleanup. This is a hack to work around issues 596 # on windows caused by the service in aelupsvc.dll preventing us from deleting 597 # vts_rm.exe (or rather the directory its in). The service is called 598 # "Application Experience", which feels like a weird joke here. 599 # 600 fRc2 = self._oTestBoxScript.reinitScratch(fnLog = self._log); 601 cRetries = 4; 602 while fRc2 is False and cRetries > 0: 603 time.sleep(5); 604 fRc2 = self._oTestBoxScript.reinitScratch(fnLog = self._log); 605 cRetries -= 1; 594 # Wipe the stuff clean. 595 # 596 fRc2 = self._oTestBoxScript.reinitScratch(fnLog = self._log, cRetries = 6); 606 597 607 598 return fRc and fRc2; … … 912 903 # 913 904 if fNeedCleanUp: 914 if self._oTestBoxScript.reinitScratch(self._logInternal ) is not True:905 if self._oTestBoxScript.reinitScratch(self._logInternal, cRetries = 6) is not True: 915 906 self._log('post run reinitScratch failed.'); 916 907 fRc = False;
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器