Changeset 97565 in vbox for trunk/src/VBox/ValidationKit/tests/additions
- Timestamp:
- Nov 16, 2022 10:20:06 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py
r97537 r97565 144 144 145 145 try: 146 self.oGuest = oSession.o.console.guest; 146 self.oGuest = oSession.o.console.guest; 147 self.oTestVm = oTestVm; 147 148 except: 148 149 reporter.errorXcpt(); … … 150 151 if self.oCreds is None: 151 152 self.oCreds = tdCtxCreds(); 152 self.oCreds.applyDefaultsIfNotSet( oTestVm);153 self.oCreds.applyDefaultsIfNotSet(self.oTestVm); 153 154 154 155 return True; … … 217 218 return (False, None); 218 219 reporter.log('Session "%s" successfully started' % (sName,)); 220 221 # 222 # Make sure that the test VM configuration and Guest Control use the same path separator style for the guest. 223 # 224 sGstSep = '\\' if self.oGuestSession.pathStyle is vboxcon.PathStyle_DOS else '/'; 225 if self.oTestVm.pathSep() != sGstSep: 226 reporter.error('Configured test VM uses a different path style (%s) than Guest Control (%s)' \ 227 % (self.oTestVm.pathSep(), sGstSep)); 219 228 break; 220 229 except: … … 4850 4859 atTests.extend([ 4851 4860 # Should succeed, as the file isn't there yet on the destination. 4852 [ tdTestCopyToFile(sSrc = sBigFileHst, sDst = sScratchGst + o s.path.sep), tdTestResultSuccess() ],4861 [ tdTestCopyToFile(sSrc = sBigFileHst, sDst = sScratchGst + oTestVm.pathSep()), tdTestResultSuccess() ], 4853 4862 # Overwrite the existing file. 4854 [ tdTestCopyToFile(sSrc = sBigFileHst, sDst = sScratchGst + o s.path.sep), tdTestResultSuccess() ],4863 [ tdTestCopyToFile(sSrc = sBigFileHst, sDst = sScratchGst + oTestVm.pathSep()), tdTestResultSuccess() ], 4855 4864 # Same file, but with a different name on the destination. 4856 4865 [ tdTestCopyToFile(sSrc = sEmptyFileHst, sDst = oTestVm.pathJoin(sScratchGst, os.path.split(sBigFileHst)[1])), … … 4884 4893 # With a trailing slash added to the destination, copy the empty guest directory 4885 4894 # (should end up as sScratchDstDir2Gst/empty): 4886 [ tdTestCopyToDir(sSrc = sScratchEmptyDirHst, sDst = sScratchDstDir2Gst + os.path.sep), tdTestResultSuccess() ], 4895 [ tdTestCopyToDir(sSrc = sScratchEmptyDirHst, sDst = sScratchDstDir2Gst + oTestVm.pathSep()), 4896 tdTestResultSuccess() ], 4887 4897 # Repeat -- this time it should fail, as the destination directory already exists (and 4888 4898 # DirectoryCopyFlag_CopyIntoExisting is not specified): 4889 [ tdTestCopyToDir(sSrc = sScratchEmptyDirHst, sDst = sScratchDstDir2Gst + os.path.sep), tdTestResultFailure() ], 4899 [ tdTestCopyToDir(sSrc = sScratchEmptyDirHst, sDst = sScratchDstDir2Gst + oTestVm.pathSep()), 4900 tdTestResultFailure() ], 4890 4901 # Add the DirectoryCopyFlag_CopyIntoExisting flag being set and it should work (again). 4891 [ tdTestCopyToDir(sSrc = sScratchEmptyDirHst, sDst = sScratchDstDir2Gst + o s.path.sep,4902 [ tdTestCopyToDir(sSrc = sScratchEmptyDirHst, sDst = sScratchDstDir2Gst + oTestVm.pathSep(), 4892 4903 afFlags = [ vboxcon.DirectoryCopyFlag_CopyIntoExisting, ]), tdTestResultSuccess() ], 4893 4904 # Copy with a different destination name just for the heck of it: … … 4905 4916 atTests.extend([ 4906 4917 # Copy the entire test tree: 4907 [ tdTestCopyToDir(sSrc = sScratchTreeDirHst, sDst = sScratchDstDir4Gst + o s.path.sep), tdTestResultSuccess() ],4918 [ tdTestCopyToDir(sSrc = sScratchTreeDirHst, sDst = sScratchDstDir4Gst + oTestVm.pathSep()), tdTestResultSuccess() ], 4908 4919 # Again, should fail this time. 4909 [ tdTestCopyToDir(sSrc = sScratchTreeDirHst, sDst = sScratchDstDir4Gst + o s.path.sep), tdTestResultFailure() ],4920 [ tdTestCopyToDir(sSrc = sScratchTreeDirHst, sDst = sScratchDstDir4Gst + oTestVm.pathSep()), tdTestResultFailure() ], 4910 4921 # Works again, as DirectoryCopyFlag_CopyIntoExisting is specified. 4911 [ tdTestCopyToDir(sSrc = sScratchTreeDirHst, sDst = sScratchDstDir4Gst + o s.path.sep,4922 [ tdTestCopyToDir(sSrc = sScratchTreeDirHst, sDst = sScratchDstDir4Gst + oTestVm.pathSep(), 4912 4923 afFlags = [ vboxcon.DirectoryCopyFlag_CopyIntoExisting, ]), tdTestResultSuccess() ], 4913 4924 ]);
Note:
See TracChangeset
for help on using the changeset viewer.