Changeset 72728 in vbox for trunk/src/VBox/ValidationKit
- Timestamp:
- Jun 28, 2018 4:24:31 PM (6 years ago)
- Location:
- trunk/src/VBox/ValidationKit/tests/additions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/additions/tdAddBasic1.py
r69111 r72728 62 62 def __init__(self): 63 63 vbox.TestDriver.__init__(self); 64 self.oTestVmSet = self.oTestVmManager.getS tandardVmSet('nat');64 self.oTestVmSet = self.oTestVmManager.getSmokeVmSet('nat'); 65 65 self.asTestsDef = ['guestprops', 'stdguestprops', 'guestcontrol']; 66 66 self.asTests = self.asTestsDef; 67 self.asRsrcs = None 67 68 68 69 self.addSubTestDriver(SubTstDrvAddGuestCtrl(self)); … … 98 99 return vbox.TestDriver.parseOption(self, asArgs, iArg); 99 100 return iArg + 1; 101 102 def getResourceSet(self): 103 if self.asRsrcs is None: 104 self.asRsrcs = [] 105 for oSubTstDrv in self.aoSubTstDrvs: 106 self.asRsrcs.extend(oSubTstDrv.asRsrcs) 107 self.asRsrcs.extend(self.oTestVmSet.getResourceSet()) 108 return self.asRsrcs 100 109 101 110 def actionConfig(self): -
trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py
r72192 r72728 932 932 ]; 933 933 self.asTests = self.asTestsDef; 934 935 self.asRsrcs = [] 936 self.asRsrcs.append('5.3/guestctrl/50mb_rnd.dat') 934 937 935 938 def parseOption(self, asArgs, iArg): # pylint: disable=R0912,R0915 … … 3134 3137 return (False, oTxsSession); 3135 3138 3136 # Some stupid trickery to guess the location of the iso. 3137 sVBoxValidationKitISO = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../VBoxValidationKit.iso')); 3138 if not os.path.isfile(sVBoxValidationKitISO): 3139 sVBoxValidationKitISO = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../VBoxTestSuite.iso')); 3140 if not os.path.isfile(sVBoxValidationKitISO): 3141 sCur = os.getcwd(); 3142 for i in range(0, 10): 3143 sVBoxValidationKitISO = os.path.join(sCur, 'validationkit/VBoxValidationKit.iso'); 3144 if os.path.isfile(sVBoxValidationKitISO): 3145 break; 3146 sVBoxValidationKitISO = os.path.join(sCur, 'testsuite/VBoxTestSuite.iso'); 3147 if os.path.isfile(sVBoxValidationKitISO): 3148 break; 3149 sCur = os.path.abspath(os.path.join(sCur, '..')); 3150 if i is None: pass; # shut up pychecker/pylint. 3151 if os.path.isfile(sVBoxValidationKitISO): 3152 reporter.log('Validation Kit .ISO found at: %s' % (sVBoxValidationKitISO,)); 3139 ## @todo r=klaus It's not good to use files with unpredictable size 3140 # for testing. Causes all sorts of weird failures as things grow, 3141 # exceeding the free space of the test VMs. Especially as this used 3142 # the very big (and quickly growing) validation kit ISO originally. 3143 3144 sTestFileBig = self.oTstDrv.getFullResourceName('5.3/guestctrl/50mb_rnd.dat') 3145 if not os.path.isfile(sTestFileBig): 3146 sTestFileBig = self.oTstDrv.getGuestAdditionsIso() 3147 if sTestFileBig == '' or not os.path.isfile(sTestFileBig): 3148 # Some stupid trickery to guess the location of the validation kit iso. 3149 sTestFileBig = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../VBoxValidationKit.iso')); 3150 if not os.path.isfile(sTestFileBig): 3151 sTestFileBig = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../VBoxTestSuite.iso')); 3152 if not os.path.isfile(sTestFileBig): 3153 sCur = os.getcwd(); 3154 for i in range(0, 10): 3155 sTestFileBig = os.path.join(sCur, 'validationkit/VBoxValidationKit.iso'); 3156 if os.path.isfile(sTestFileBig): 3157 break; 3158 sTestFileBig = os.path.join(sCur, 'testsuite/VBoxTestSuite.iso'); 3159 if os.path.isfile(sTestFileBig): 3160 break; 3161 sCur = os.path.abspath(os.path.join(sCur, '..')); 3162 if i is None: pass; # shut up pychecker/pylint. 3163 3164 if os.path.isfile(sTestFileBig): 3165 reporter.log('Test file for big copy found at: %s' % (sTestFileBig,)); 3153 3166 else: 3154 reporter.log('Warning: Validation Kit .ISOnot found -- some tests might fail');3167 reporter.log('Warning: Test file for big copy not found -- some tests might fail'); 3155 3168 3156 3169 aaTests = []; … … 3170 3183 tdTestResult(fRc = False) ], 3171 3184 # Testing DirectoryCopyFlag flags. 3172 [ tdTestCopyTo(sUser = sUser, sPassword = sPassword, sSrc = s VBoxValidationKitISO,3185 [ tdTestCopyTo(sUser = sUser, sPassword = sPassword, sSrc = sTestFileBig, 3173 3186 sDst = sScratchGstInvalid, aFlags = [ 80 ] ), 3174 3187 tdTestResult(fRc = False) ], 3175 3188 # Testing FileCopyFlag flags. 3176 [ tdTestCopyTo(sUser = sUser, sPassword = sPassword, sSrc = s VBoxValidationKitISO,3189 [ tdTestCopyTo(sUser = sUser, sPassword = sPassword, sSrc = sTestFileBig, 3177 3190 sDst = sScratchGstInvalid, aFlags = [ 80 ] ), 3178 3191 tdTestResult(fRc = False) ], … … 3192 3205 if self.oTstDrv.fpApiVer > 5.2: 3193 3206 aaTests.extend([ 3194 [ tdTestCopyTo(sUser = sUser, sPassword = sPassword, sSrc = s VBoxValidationKitISO,3207 [ tdTestCopyTo(sUser = sUser, sPassword = sPassword, sSrc = sTestFileBig, 3195 3208 sDst = sScratchGstInvalid), 3196 3209 tdTestResult(fRc = False) ], 3197 [ tdTestCopyTo(sUser = sUser, sPassword = sPassword, sSrc = s VBoxValidationKitISO,3210 [ tdTestCopyTo(sUser = sUser, sPassword = sPassword, sSrc = sTestFileBig, 3198 3211 sDst = sScratchGstNotExist), 3199 3212 tdTestResult(fRc = False) ], 3200 [ tdTestCopyTo(sUser = sUser, sPassword = sPassword, sSrc = s VBoxValidationKitISO,3213 [ tdTestCopyTo(sUser = sUser, sPassword = sPassword, sSrc = sTestFileBig, 3201 3214 sDst = sScratchGstNotExist), 3202 3215 tdTestResult(fRc = False) ], 3203 [ tdTestCopyTo(sUser = sUser, sPassword = sPassword, sSrc = s VBoxValidationKitISO,3216 [ tdTestCopyTo(sUser = sUser, sPassword = sPassword, sSrc = sTestFileBig, 3204 3217 sDst = os.path.join(sScratchGstNotExist, 'renamedfile.dll')), 3205 3218 tdTestResult(fRc = False) ], 3206 [ tdTestCopyTo(sUser = sUser, sPassword = sPassword, sSrc = s VBoxValidationKitISO,3207 sDst = os.path.join(sScratchGst, 'HostG uestAdditions.iso')),3219 [ tdTestCopyTo(sUser = sUser, sPassword = sPassword, sSrc = sTestFileBig, 3220 sDst = os.path.join(sScratchGst, 'HostGABig.dat')), 3208 3221 tdTestResult(fRc = True) ], 3209 [ tdTestCopyTo(sUser = sUser, sPassword = sPassword, sSrc = s VBoxValidationKitISO,3210 sDst = os.path.join(sScratchGst, 'HostG uestAdditions.iso')),3222 [ tdTestCopyTo(sUser = sUser, sPassword = sPassword, sSrc = sTestFileBig, 3223 sDst = os.path.join(sScratchGst, 'HostGABig.dat')), 3211 3224 tdTestResult(fRc = True) ], 3212 3225 # Note: Copying files into directories via Main is supported only in versions > 5.2. 3213 3226 # Destination is a directory. 3214 [ tdTestCopyTo(sUser = sUser, sPassword = sPassword, sSrc = s VBoxValidationKitISO,3227 [ tdTestCopyTo(sUser = sUser, sPassword = sPassword, sSrc = sTestFileBig, 3215 3228 sDst = sScratchGst), 3216 3229 tdTestResult(fRc = True) ], 3217 3230 # Copy over file again into same directory (overwrite). 3218 [ tdTestCopyTo(sUser = sUser, sPassword = sPassword, sSrc = s VBoxValidationKitISO,3231 [ tdTestCopyTo(sUser = sUser, sPassword = sPassword, sSrc = sTestFileBig, 3219 3232 sDst = sScratchGst), 3220 3233 tdTestResult(fRc = True) ] … … 3224 3237 # Copy the same file over to the guest, but this time store the file into the former 3225 3238 # file's ADS (Alternate Data Stream). Only works on Windows, of course. 3226 [ tdTestCopyTo(sUser = sUser, sPassword = sPassword, sSrc = s VBoxValidationKitISO,3227 sDst = os.path.join(sScratchGst, 'HostG uestAdditions.iso:ADS-Test')),3239 [ tdTestCopyTo(sUser = sUser, sPassword = sPassword, sSrc = sTestFileBig, 3240 sDst = os.path.join(sScratchGst, 'HostGABig.dat:ADS-Test')), 3228 3241 tdTestResult(fRc = True) ] 3229 3242 ]); … … 3615 3628 def __init__(self): 3616 3629 vbox.TestDriver.__init__(self); 3617 self.oTestVmSet = self.oTestVmManager.getStandardVmSet('nat'); 3630 self.oTestVmSet = self.oTestVmManager.getSmokeVmSet('nat'); 3631 self.asRsrcs = None 3618 3632 self.fQuick = False; # Don't skip lengthly tests by default. 3619 3633 self.addSubTestDriver(SubTstDrvAddGuestCtrl(self)); … … 3645 3659 return iArg + 1; 3646 3660 3661 def getResourceSet(self): 3662 if self.asRsrcs is None: 3663 self.asRsrcs = [] 3664 for oSubTstDrv in self.aoSubTstDrvs: 3665 self.asRsrcs.extend(oSubTstDrv.asRsrcs) 3666 self.asRsrcs.extend(self.oTestVmSet.getResourceSet()) 3667 return self.asRsrcs 3668 3647 3669 def actionConfig(self): 3648 3670 if not self.importVBoxApi(): # So we can use the constant below.
Note:
See TracChangeset
for help on using the changeset viewer.