VirtualBox

Changeset 86438 in vbox for trunk


Ignore:
Timestamp:
Oct 4, 2020 11:36:35 AM (4 years ago)
Author:
vboxsync
Message:

testdriver/vbox.py: Undo libasan.so.X preloading and memory leak detection disabling from vboxinstaller.py. Also, try use VBoxManage --dump-build-type to figure out the build type instead of assuming everything is a release build. bugref:9841

File:
1 edited

Legend:

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

    r86299 r86438  
    460460            self.sDesignation = os.environ.get('TEST_BUILD_DESIGNATION', 'XXXXX');
    461461            ## @todo Much more work is required here.
     462
     463            # Determine the build type.
     464            (iExit, sStdOut, sStdErr) = utils.processOutputUnchecked([os.path.join(self.sInstallPath,
     465                                                                                   'VBoxManage' + base.exeSuff()),
     466                                                                      '--dump-build-type']);
     467            sStdOut = sStdOut.strip();
     468            if iExit == 0 and sStdOut in ('release', 'debug', 'strict', 'dbgopt', 'asan'):
     469                self.sType = sStdOut;
     470                reporter.log2('build type: %s' % (self.sType));
     471            else:
     472                reporter.log2('--dump-build-type -> iExit=%u sStdOut=%s' % (iExit, sStdOut,));
    462473
    463474            # Do some checks.
     
    873884        self.fAlwaysUploadScreenshots = False;
    874885        self.fEnableDebugger          = True;
     886
     887        # Drop LD_PRELOAD and enable memory leak detection in LSAN_OPTIONS from vboxinstall.py
     888        # before doing build detection. This is a little crude and inflexible...
     889        if 'LD_PRELOAD' in os.environ:
     890            del os.environ['LD_PRELOAD'];
     891            if 'LSAN_OPTIONS' in os.environ:
     892                asLSanOptions = os.environ['LSAN_OPTIONS'].split(':');
     893                try:    asLSanOptions.remove('detect_leaks=0');
     894                except: pass;
     895                if asLSanOptions: os.environ['LSAN_OPTIONS'] = ':'.join(asLSanOptions);
     896                else:         del os.environ['LSAN_OPTIONS'];
    875897
    876898        # Quietly detect build and validation kit.
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