VirtualBox

Ignore:
Timestamp:
Jul 1, 2019 4:49:51 PM (5 years ago)
Author:
vboxsync
Message:

ValKit/UnattendedInst1,++: Adjustments for ubuntu. bugref:9151

File:
1 edited

Legend:

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

    r79092 r79452  
    5151    """
    5252
    53     def __init__(self, oTstDrv, fUseAltFsPerfPathForWindows = False):
     53    def __init__(self, oTstDrv):
    5454        base.SubTestDriverBase.__init__(self, oTstDrv, 'add-shared-folders', 'Shared Folders');
    5555
    56         self.asTestsDef                     = [ 'fsperf', ];
    57         self.asTests                        = self.asTestsDef;
    58         self.asExtraArgs                    = [];
    59         self.sGstFsPerfPath                 = '${CDROM}/vboxvalidationkit/${OS/ARCH}/FsPerf${EXESUFF}';
    60         self.sGstFsPerfPathAlt              = 'C:/Apps/FsPerf${EXESUFF}';
    61         self.fUseAltFsPerfPathForWindows    = fUseAltFsPerfPathForWindows;
     56        self.asTestsDef         = [ 'fsperf', ];
     57        self.asTests            = self.asTestsDef;
     58        self.asExtraArgs        = [];
     59        self.asGstFsPerfPaths   = [
     60            '${CDROM}/vboxvalidationkit/${OS/ARCH}/FsPerf${EXESUFF}',
     61            '${CDROM}/${OS/ARCH}/FsPerf${EXESUFF}',
     62            '${TXSDIR}/${OS/ARCH}/FsPerf${EXESUFF}',
     63            '${TXSDIR}/FsPerf${EXESUFF}',
     64            'E:/vboxvalidationkit/${OS/ARCH}/FsPerf${EXESUFF}',
     65        ];
    6266
    6367    def parseOption(self, asArgs, iArg):
     
    206210            # Add the extra arguments from the command line and kick it off:
    207211            asArgs.extend(self.asExtraArgs);
     212
     213            # Run FsPerf:
    208214            reporter.log2('Starting guest FsPerf (%s)...' % (asArgs,));
    209             sFsPerfPath = self.sGstFsPerfPath;
    210             if oTestVm.isWindows() and self.fUseAltFsPerfPathForWindows: # bird: Temp hack till we get UDF cloning implemented.
    211                 sFsPerfPath = self.sGstFsPerfPathAlt;                    #       Helps making unattended install tests work.
     215            sFsPerfPath = self._locateGstFsPerf(oTxsSession);
    212216            fRc = self.oTstDrv.txsRunTest(oTxsSession, 'FsPerf', 30 * 60 * 1000, sFsPerfPath, asArgs);
    213217            reporter.log2('FsPerf -> %s' % (fRc,));
     
    225229
    226230
     231    def _locateGstFsPerf(self, oTxsSession):
     232        """
     233        Returns guest side path to FsPerf.
     234        """
     235        for sFsPerfPath in self.asGstFsPerfPaths:
     236            if oTxsSession.syncIsFile(sFsPerfPath):
     237                return sFsPerfPath;
     238        reporter.log('Unable to find guest FsPerf in any of these places: %s' % ('\n    '.join(self.asGstFsPerfPaths),));
     239        return self.asGstFsPerfPaths[0];
     240
     241
    227242
    228243if __name__ == '__main__':
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