VirtualBox

Ignore:
Timestamp:
Feb 14, 2023 9:34:23 PM (2 years ago)
Author:
vboxsync
Message:

ValKit/tdUnitTest1.py: Provide path defaults in remote-exec mode too, based on test config. bugref:10195

File:
1 edited

Legend:

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

    r98564 r98571  
    383383        self.cFailed    = 0;
    384384
    385         # The source directory where our unit tests live.
     385        ## The source directory where our unit tests live.
    386386        # This most likely is our out/ or some staging directory and
    387387        # also acts the source for copying over the testcases to a remote target.
     
    425425
    426426        reporter.log2('Detecting paths ...');
    427 
    428         #
    429         # Do some sanity checking first.
    430         #
    431         if self.sMode == 'remote-exec' and not self.sUnitTestsPathSrc: # There is no way we can figure this out automatically.
    432             reporter.error('Unit tests source must be specified explicitly for selected mode!');
    433             return False;
    434427
    435428        #
     
    450443        # Solaris requires special handling because of it's multi arch subdirs.
    451444        #
    452         if not self.sVBoxInstallRoot:
     445        if not self.sVBoxInstallRoot and self.sMode == 'remote-exec':
     446            self.sVBoxInstallRoot = '${CDROM}/${OS}/${ARCH}';
     447
     448        elif not self.sVBoxInstallRoot:
    453449            self.sVBoxInstallRoot = self.oBuild.sInstallPath;
    454450            if not self.oBuild.isDevBuild() and utils.getHostOs() == 'solaris':
     
    476472        # The unittests are generally not installed, so look for them.
    477473        #
    478         if not self.sUnitTestsPathSrc:
     474        if not self.sUnitTestsPathSrc and self.sMode == 'remote-exec':
     475            self.sUnitTestsPathSrc = '${CDROM}/testcase/${OS}/${ARCH}';
     476
     477        elif not self.sUnitTestsPathSrc:
    479478            sBinOrDist = 'dist' if utils.getHostOs() in [ 'darwin', ] else 'bin';
    480479            asCandidates = [
     
    10161015            asFilesToRemove.append(sDst);
    10171016
    1018             # Copy required dependencies to destination.
     1017            # Copy required dependencies to destination .
     1018            # Note! The testcases are statically linked, so there are no VBoxRT.dll/so/dylib
     1019            #       to copy here.  This code can be currently be ignored.
    10191020            if self.isRemoteMode():
    10201021                for sLib in self.kdTestCaseDepsLibs:
     
    10261027                            self._wrapCopyFile(sSrc, sDst, fModeDeps);
    10271028                            asFilesToRemove.append(sDst);
     1029
     1030            ## @todo r=bird: The next two are check for _local_ files matching the remote path when in remote-mode.
     1031            ##               It makes for very confusing reading and is a potential for trouble.
    10281032
    10291033            # Copy any associated .dll/.so/.dylib.
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