Changeset 98079 in vbox for trunk/src/VBox/ValidationKit/tests
- Timestamp:
- Jan 14, 2023 10:47:51 AM (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/api/tdCloneMedium1.py
r97936 r98079 43 43 # Standard Python imports. 44 44 import os 45 from subprocess import call46 45 import sys 47 46 … … 78 77 # 79 78 80 def createTestMedium(self, oVM, sPathSuffix, sFmt = 'VDI', cbSize = 1024*1024, data = []):79 def createTestMedium(self, oVM, sPathSuffix, sFmt = 'VDI', cbSize = 1024*1024, data): 81 80 assert oVM is not None 82 81 … … 101 100 oMediumIOBaseHdd1 = oBaseHdd1.openForIO(True, "") 102 101 103 if (len(data) > 0):102 if data and len(data): 104 103 cbWritten = oMediumIOBaseHdd1.write(0, data) 105 104 … … 134 133 oProgressCom = oSrcHd.resizeAndCloneTo(oTgtHd, cbTgtSize, (vboxcon.MediumVariant_Standard, ), None); 135 134 except: 136 reporter.errorXcpt('failed to resize and clone medium %s to %s and to size %d' % (oSrcHd.name, oTgtHd.name, cbTgtSize)); 135 reporter.errorXcpt('failed to resize and clone medium %s to %s and to size %d' \ 136 % (oSrcHd.name, oTgtHd.name, cbTgtSize)); 137 137 return False; 138 138 oProgress = vboxwrappers.ProgressWrapper(oProgressCom, self.oTstDrv.oVBoxMgr, self.oTstDrv, 139 'resize and clone base disk %s to %s and to size %d' % (oSrcHd.name, oTgtHd.name, cbTgtSize)); 139 'resize and clone base disk %s to %s and to size %d' \ 140 % (oSrcHd.name, oTgtHd.name, cbTgtSize)); 140 141 oProgress.wait(cMsTimeout = 15*60*1000); # 15 min 141 142 oProgress.logResult(); … … 235 236 236 237 def testAll(self): 237 return (self.testCloneOnly() & self.testResizeAndClone())238 return self.testCloneOnly() & self.testResizeAndClone() 238 239 239 240 if __name__ == '__main__':
Note:
See TracChangeset
for help on using the changeset viewer.