VirtualBox

Ignore:
Timestamp:
Feb 14, 2023 1:57:32 PM (22 months ago)
Author:
vboxsync
Message:

ValKit/tdUnitTest1.py: Use a dictionary for enviornment variables, not a list, because it will grow too long and triggers TXS enviornment limit check. bugref:10195

File:
1 edited

Legend:

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

    r98076 r98563  
    385385        self.sUnitTestsPathSrc = None;
    386386
    387         # Array of environment variables with NAME=VAL entries
    388         # to be applied for testcases.
    389         #
    390         # This is also needed for testcases which are being executed remotely.
    391         self.asEnv = [];
     387        ## Remote environment changes.
     388        self.dRemoteEnvChg = {};
    392389
    393390        # The destination directory our unit tests live when being
     
    970967    def _envSet(self, sName, sValue):
    971968        if self.isRemoteMode():
    972             # For remote execution we cache the environment block and pass it
    973             # right when the process execution happens.
    974             self.asEnv.append([ sName, sValue ]);
     969            self.dRemoteEnvChg[sName] = sValue;
    975970        else:
    976971            os.environ[sName] = sValue;
     
    10671062
    10681063        self._envSet('IPRT_TEST_OMIT_TOP_TEST', '1');
    1069         self._envSet('IPRT_TEST_FILE', sXmlFile);
     1064        self._envSet('IPRT_TEST_FILE', sXmlFile);  ## @todo skip for remote. Makes _no_ sense.
    10701065
    10711066        if self._wrapPathExists(sXmlFile):
     
    10911086        if not self.fDryRun:
    10921087            if fCopyToRemote:
     1088                asRemoteEnvChg = ['%s=%s' % (sKey, self.dRemoteEnvChg[sKey]) for sKey in self.dRemoteEnvChg];
    10931089                fRc = self.txsRunTest(self.oTxsSession, sName, cMsTimeout = 30 * 60 * 1000, sExecName = asArgs[0],
    1094                                       asArgs = asArgs, asAddEnv = self.asEnv, fCheckSessionStatus = True);
     1090                                      asArgs = asArgs, asAddEnv = asRemoteEnvChg, fCheckSessionStatus = True);
    10951091                if fRc:
    10961092                    iRc = 0;
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