VirtualBox

Ignore:
Timestamp:
Nov 6, 2022 1:45:35 PM (2 years ago)
Author:
vboxsync
Message:

Validation Kit/Guest Control: More tests. ​bugref:10286

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py

    r97420 r97421  
    48454845        if self.oTstDrv.fpApiVer > 5.2: # Copying files into directories via Main is supported only 6.0 and later.
    48464846            atTests.extend([
    4847                 [ tdTestCopyToFile(sSrc = sBigFileHst,   sDst = sScratchGst), tdTestResultSuccess() ],
    4848                 [ tdTestCopyToFile(sSrc = sBigFileHst,   sDst = sScratchGst), tdTestResultSuccess() ],            # Overwrite
     4847                # Should succeed, as the file isn't there yet on the destination.
     4848                [ tdTestCopyToFile(sSrc = sBigFileHst,   sDst = sScratchGst + os.path.sep), tdTestResultSuccess() ],
     4849                # Overwrite the existing file.
     4850                [ tdTestCopyToFile(sSrc = sBigFileHst,   sDst = sScratchGst + os.path.sep), tdTestResultSuccess() ],
     4851                # Same file, but with a different name on the destination.
    48494852                [ tdTestCopyToFile(sSrc = sEmptyFileHst, sDst = oTestVm.pathJoin(sScratchGst, os.path.split(sBigFileHst)[1])),
    48504853                  tdTestResultSuccess() ],                                                                  # Overwrite
     
    48664869            atTests.extend([
    48674870                # Without a trailing slash added to the destination this should fail,
    4868                 # as the destination directory already exist.
     4871                # as the destination directory already exists.
    48694872                [ tdTestCopyToDir(sSrc = sScratchEmptyDirHst, sDst = sScratchDstDir1Gst),   tdTestResultFailure() ],
    48704873                # Same existing host directory, but this time with DirectoryCopyFlag_CopyIntoExisting set.
     
    50385041        #
    50395042        atTests.extend([
    5040             [ tdTestCopyFromFile(oSrc = oExistingFileGst, sDst = os.path.join(sScratchHst, 'copyfile1')),
    5041               tdTestResultSuccess() ],
    5042             [ tdTestCopyFromFile(oSrc = oExistingFileGst, sDst = os.path.join(sScratchHst, 'copyfile1')), # Overwrite it
    5043               tdTestResultSuccess() ],
    5044             [ tdTestCopyFromFile(oSrc = oExistingFileGst, sDst = os.path.join(sScratchHst, 'copyfile2')),
    5045               tdTestResultSuccess() ],
     5043            # Should succeed, as the file isn't there yet on the destination.
     5044            [ tdTestCopyFromFile(oSrc = oExistingFileGst, sDst = os.path.join(sScratchHst, 'copyfile1')), tdTestResultSuccess() ],
     5045            # Overwrite the existing file.
     5046            [ tdTestCopyFromFile(oSrc = oExistingFileGst, sDst = os.path.join(sScratchHst, 'copyfile1')), tdTestResultSuccess() ],
     5047            # Same file, but with a different name on the destination.
     5048            [ tdTestCopyFromFile(oSrc = oExistingFileGst, sDst = os.path.join(sScratchHst, 'copyfile2')), tdTestResultSuccess() ],
    50465049        ]);
    5047         if self.oTstDrv.fpApiVer > 5.2:
     5050
     5051        if self.oTstDrv.fpApiVer > 5.2: # Copying files into directories via Main is supported only 6.0 and later.
    50485052            # Copy into a directory.
    50495053            atTests.extend([
    5050                 [ tdTestCopyFromFile(oSrc = oExistingFileGst, sDst = sScratchHst), tdTestResultSuccess() ],
     5054                # This should fail, as sScratchHst exists and is a directory.
     5055                [ tdTestCopyFromFile(oSrc = oExistingFileGst, sDst = sScratchHst), tdTestResultFailure() ],
     5056                # Same existing host directory, but this time with a trailing slash.
     5057                # This should succeed, as the file isn't there yet on the destination.
     5058                [ tdTestCopyFromFile(oSrc = oExistingFileGst, sDst = sScratchHst + os.path.sep), tdTestResultSuccess() ],
     5059                # Overwrite the existing file.
    50515060                [ tdTestCopyFromFile(oSrc = oExistingFileGst, sDst = sScratchHst + os.path.sep), tdTestResultSuccess() ],
    50525061            ]);
    50535062
    5054             #
    5055             # Directory tree copying:
    5056             #
     5063        #
     5064        # Directory handling.
     5065        #
     5066        if self.oTstDrv.fpApiVer > 5.2: # Copying directories via Main is supported only in versions > 5.2.
    50575067            atTests.extend([
    50585068                # Without a trailing slash added to the destination this should fail,
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette