VirtualBox

Changeset 86450 in vbox


Ignore:
Timestamp:
Oct 5, 2020 8:37:37 AM (4 years ago)
Author:
vboxsync
Message:

testdriver/vbox.py: Be more careful when invoking VBoxManage --dump-build-type. bugref:9841

File:
1 edited

Legend:

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

    r86440 r86450  
    461461            ## @todo Much more work is required here.
    462462
    463             # Determine the build type.
    464             (iExit, sStdOut, _) = 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));
     463            # Try Determine the build type.
     464            sVBoxManage = os.path.join(self.sInstallPath, 'VBoxManage' + base.exeSuff());
     465            if os.path.isfile(sVBoxManage):
     466                try:
     467                    (iExit, sStdOut, _) = utils.processOutputUnchecked([sVBoxManage, '--dump-build-type']);
     468                    sStdOut = sStdOut.strip();
     469                    if iExit == 0 and sStdOut in ('release', 'debug', 'strict', 'dbgopt', 'asan'):
     470                        self.sType = sStdOut;
     471                        reporter.log2('build type: %s' % (self.sType));
     472                    else:
     473                        reporter.log2('Build: --dump-build-type -> iExit=%u sStdOut=%s' % (iExit, sStdOut,));
     474                except:
     475                    reporter.logXcpt('Build: Running "%s --dump-build-type" failed!' % (sVBoxManage,));
    471476            else:
    472                 reporter.log2('--dump-build-type -> iExit=%u sStdOut=%s' % (iExit, sStdOut,));
     477                reporter.log('Build: sVBoxManage=%s not found!' % (sVBoxManage,));
    473478
    474479            # Do some checks.
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