VirtualBox

Changeset 79198 in vbox


Ignore:
Timestamp:
Jun 18, 2019 8:44:46 AM (5 years ago)
Author:
vboxsync
Message:

testfileset.py: Preps for using the TestFileSet for the copy-to-guest tests too. bugref:9151 bugref:9320

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testdriver/testfileset.py

    r79193 r79198  
    412412        """
    413413
     414        # We only need to flip DOS slashes to unix ones, since windows & OS/2 can handle unix slashes.
     415        fDosToUnix = self.fDosStyle and os.path.sep != '\\';
     416
    414417        # The directories:
    415418        for oDir in self.aoDirs:
    416419            sPath = oDir.sPath;
    417420            if sAltBase:
    418                 sPath = sAltBase + sPath[len(self.sBasePath):];
     421                if fDosToUnix:
     422                    sPath = sAltBase + sPath[len(self.sBasePath):].replace('\\', os.path.sep);
     423                else:
     424                    sPath = sAltBase + sPath[len(self.sBasePath):];
     425            elif fDosToUnix:
     426                sPath = sPath.replace('\\', os.path.sep);
    419427
    420428            try:
     
    427435            sPath = oFile.sPath;
    428436            if sAltBase:
    429                 sPath = sAltBase + sPath[len(self.sBasePath):];
     437                if fDosToUnix:
     438                    sPath = sAltBase + sPath[len(self.sBasePath):].replace('\\', os.path.sep);
     439                else:
     440                    sPath = sAltBase + sPath[len(self.sBasePath):];
     441            elif fDosToUnix:
     442                sPath = sPath.replace('\\', os.path.sep);
    430443
    431444            try:
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