Changeset 78644 in vbox for trunk/src/VBox
- Timestamp:
- May 22, 2019 12:29:14 AM (6 years ago)
- Location:
- trunk/src/VBox/ValidationKit/tests/additions
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/additions/Makefile.kmk
r76553 r78644 34 34 ValidationKitTestsAdditions_EXEC_SOURCES := \ 35 35 $(PATH_SUB_CURRENT)/tdAddBasic1.py \ 36 $(PATH_SUB_CURRENT)/tdAddGuestCtrl.py 36 $(PATH_SUB_CURRENT)/tdAddGuestCtrl.py \ 37 $(PATH_SUB_CURRENT)/tdAddSharedFolders1.py 37 38 38 39 -
trunk/src/VBox/ValidationKit/tests/additions/tdAddBasic1.py
r78642 r78644 35 35 import os; 36 36 import sys; 37 import uuid; 37 38 38 39 # Only the main script needs to modify the path. … … 51 52 sys.path.append(os.path.dirname(os.path.abspath(__file__))); # For sub-test drivers. 52 53 from tdAddGuestCtrl import SubTstDrvAddGuestCtrl; 53 #from tdAddSharedFolders1 import SubTstDrvAddSharedFolders1;54 from tdAddSharedFolders1 import SubTstDrvAddSharedFolders1; 54 55 55 56 … … 65 66 vbox.TestDriver.__init__(self); 66 67 self.oTestVmSet = self.oTestVmManager.getSmokeVmSet('nat'); 67 self.asTestsDef = ['install', 'guestprops', 'stdguestprops', 'guestcontrol', 'sharedfolders'];68 self.asTestsDef = ['install', 'guestprops', 'stdguestprops', 'guestcontrol', ]; #'sharedfolders']; 68 69 self.asTests = self.asTestsDef; 69 70 self.asRsrcs = None 70 71 71 72 self.addSubTestDriver(SubTstDrvAddGuestCtrl(self)); 72 #self.addSubTestDriver(SubTstDrvAddSharedFolders1(self));73 self.addSubTestDriver(SubTstDrvAddSharedFolders1(self)); 73 74 74 75 # … … 117 118 eNic0AttachType = vboxcon.NetworkAttachmentType_NAT; 118 119 sGaIso = self.getGuestAdditionsIso(); 120 121 # On 6.0 we merge the GAs with the ValidationKit so we can get at FsPerf. 122 # Note! Not possible to do a dboule import as both images an '/OS2' dir. 123 # So, using same dir as with unattended VISOs for the valkit. 124 if self.fpApiVer >= 6.0 and 'sharedfolders' in self.asTests: 125 sGaViso = os.path.join(self.sScratchPath, 'AdditionsAndValKit.viso'); 126 ## @todo encode as bash cmd line: 127 sVisoContent = '--iprt-iso-maker-file-marker-bourne-sh %s ' \ 128 '--import-iso \'%s\' ' \ 129 '--push-iso \'%s\' ' \ 130 '/vboxvalidationkit=/ ' \ 131 '--pop ' \ 132 % (uuid.uuid4(), sGaIso, self.sVBoxValidationKitIso); 133 reporter.log2('Using VISO combining GAs and ValKit "%s": %s' % (sGaViso, sVisoContent)); 134 oGaViso = open(sGaViso, 'w'); 135 oGaViso.write(sVisoContent); 136 oGaViso.close(); 137 sGaIso = sGaViso; 138 119 139 return self.oTestVmSet.actionConfig(self, eNic0AttachType = eNic0AttachType, sDvdImage = sGaIso); 120 140 … … 164 184 reporter.testDone(fSkip); 165 185 166 #fSkip = 'sharedfolders' not in self.asTests;167 #reporter.testStart('Shared Folders');168 #if not fSkip:169 #fRc, oTxsSession = self.aoSubTstDrvs[1].testIt(oTestVm, oSession, oTxsSession);170 #reporter.testDone(fSkip or fRc is None);186 fSkip = 'sharedfolders' not in self.asTests and self.fpApiVer >= 6.0; 187 reporter.testStart('Shared Folders'); 188 if not fSkip: 189 fRc, oTxsSession = self.aoSubTstDrvs[1].testIt(oTestVm, oSession, oTxsSession); 190 reporter.testDone(fSkip or fRc is None); 171 191 172 192 ## @todo Save and restore test. -
trunk/src/VBox/ValidationKit/tests/additions/tdAddSharedFolders1.py
r78642 r78644 3 3 4 4 """ 5 VirtualBox Validation Kit - Shared Folders 5 VirtualBox Validation Kit - Shared Folders #1. 6 6 """ 7 7 … … 43 43 from testdriver import reporter; 44 44 from testdriver import base; 45 from testdriver import vbox;46 from testdriver import vboxcon;47 from testdriver import vboxwrappers;48 45 from common import utils; 49 50 # Python 3 hacks:51 if sys.version_info[0] >= 3:52 long = int # pylint: disable=W0622,C010353 46 54 47 … … 104 97 # 105 98 sSharedFolder1 = os.path.join(self.oTstDrv.sScratchPath, 'shfl1'); 99 reporter.log2('Creating shared host folder "%s"...' % (sSharedFolder1,)); 106 100 if os.path.exists(sSharedFolder1): 107 101 try: shutil.rmtree(sSharedFolder1); … … 125 119 reporter.testStart('Automount'); 126 120 121 reporter.log2('Creating shared folder shfl1...'); 127 122 try: 128 123 oConsole = oSession.o.console; … … 137 132 while True: 138 133 fRc = oTxsSession.syncIsDir(sMountPoint1 + sGuestSlash + 'candle.dir'); 134 reporter.log2('candle.dir check -> %s' % (fRc,)); 139 135 if fRc is not False: 140 136 break; … … 142 138 reporter.error('Shared folder mounting timed out!'); 143 139 break; 144 oTstDrv.sleep(1);140 self.oTstDrv.sleep(1); 145 141 146 142 reporter.testDone(); 147 if fRc is not None:143 if fRc is not True: 148 144 return (False, oTxsSession); # skip the remainder if we cannot auto mount the folder. 149 145 … … 154 150 fSkip = 'fsperf' not in self.asTests; 155 151 if fSkip is False: 156 cMbFree = utils.getDiskUsage(sSharedFolders1); 157 if cMbFree < 16: 152 cMbFree = utils.getDiskUsage(sSharedFolder1); 153 if cMbFree >= 16: 154 reporter.log2('Free space: %u MBs' % (cMbFree,)); 155 else: 158 156 reporter.log('Skipping FsPerf because only %u MB free on %s' % (cMbFree, sSharedFolder1,)); 159 157 fSkip = True; 160 158 if fSkip is False: 161 asArgs = ['FsPerf', '-d', sMountPoint1 + sGuestSlash + 'fstestdir-1', ]; 162 if oTestVm.sGuestOsType in []: 163 asArgs.append('--no-mmap'); # Fails on older than win7 (CcCoherencyFlushAndPurgeCache). 164 fRc = oTstDrv.txsRunTest(oTxsSession, 'FsPerf', 10 * 60 * 1000, '${CDROM}/${OS/ARCH}/FsPerf${EXESUFF}', asArgs); 159 # Common arguments: 160 asArgs = ['FsPerf', '-d', sMountPoint1 + sGuestSlash + 'fstestdir-1', '-m200']; 161 162 # Skip mmap on older windows systems without CcCoherencyFlushAndPurgeCache (>= w7). 163 reporter.log2('oTestVm.sGuestOsType=%s' % (oTestVm.sGuestOsType,)); 164 if oTestVm.sGuestOsType in [ 'WindowsNT3x', 'WindowsNT4', 'Windows2000', 'WindowsXP', 'WindowsXP_64', 165 'Windows2003', 'Windows2003_64', 'WindowsVista', 'WindowsVista_64', 166 'Windows2008', 'Windows2008_64']: 167 asArgs.append('--no-mmap'); 168 169 # Configure I/O block sizes according to guest memory size: 170 cbMbRam = 128; 171 try: cbMbRam = oSession.o.machine.memorySize; 172 except: reporter.errorXcpt(); 173 reporter.log2('cbMbRam=%s' % (cbMbRam,)); 174 asArgs.append('--set-block-size=1'); 175 asArgs.append('--add-block-size=512'); 176 asArgs.append('--add-block-size=4096'); 177 asArgs.append('--add-block-size=16384'); 178 asArgs.append('--add-block-size=65536'); 179 asArgs.append('--add-block-size=1048576'); # 1 MiB 180 if cbMbRam >= 512: 181 asArgs.append('--add-block-size=33554432'); # 32 MiB 182 if cbMbRam >= 768: 183 asArgs.append('--add-block-size=134217728'); # 128 MiB 184 185 reporter.log2('Starting guest FsPerf (%s)...' % (asArgs,)); 186 fRc = self.oTstDrv.txsRunTest(oTxsSession, 'FsPerf', 10 * 60 * 1000, 187 '${CDROM}/vboxvalidationkit/${OS/ARCH}/FsPerf${EXESUFF}', asArgs); 188 reporter.log2('FsPerf -> %s' % (fRc,)); 165 189 166 190 sTestDir = os.path.join(sSharedFolder1, 'fstestdir-1');
Note:
See TracChangeset
for help on using the changeset viewer.