VirtualBox

Changeset 94510 in vbox


Ignore:
Timestamp:
Apr 7, 2022 12:08:20 PM (3 years ago)
Author:
vboxsync
Message:

Validation Kit/unit tests: Log expanded strings to easier find errors on the Validation Kit .ISO. ​bugref:10195

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/unittests/tdUnitTest1.py

    r94506 r94510  
    795795        return iRc == 0;
    796796
     797
     798    def _logExpandString(self, sString, cVerbosity = 2):
     799        """
     800        Expands a given string by asking TxS on the guest side and logs it.
     801        Uses log level 2 by default.
     802
     803        No-op if no TxS involved.
     804        """
     805        if reporter.getVerbosity() < cVerbosity \
     806        or self.oTxsSession is None:
     807            return;
     808        sStringExp = self.txsExpandString(self.oSession, self.oTxsSession, sString);
     809        if not sStringExp:
     810            return;
     811        reporter.log2('_logExpandString: "%s" -> "%s"' % (sString, sStringExp));
     812
    797813    def _wrapPathExists(self, sPath):
    798814        """
     
    804820        fRc = False;
    805821        if self.sMode.startswith('remote'):
     822            self._logExpandString(sPath);
    806823            fRc = self.txsIsDir(self.oSession, self.oTxsSession, sPath, fIgnoreErrors = True);
    807824            if not fRc:
     
    839856        fRc = True;
    840857        if self.sMode.startswith('remote'):
     858            self._logExpandString(sSrc);
     859            self._logExpandString(sDst);
    841860            if self.sMode == 'remote-exec':
    842861                self.txsCopyFile(self.oSession, self.oTxsSession, sSrc, sDst, iMode);
     
    947966                asDirsToRemove.append(sDstDir);
    948967
    949             sDst = os.path.join(sDstDir, os.path.basename(sFullPath));
     968            sDst = os.path.join(sDstDir, os.path.basename(sFullPath) + self.sExeSuff);
    950969            self._wrapCopyFile(sFullPath + self.sExeSuff, sDst, 0o755);
    951970            asFilesToRemove.append(sDst);
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