VirtualBox

Changeset 56722 in vbox


Ignore:
Timestamp:
Jul 1, 2015 6:27:52 AM (10 years ago)
Author:
vboxsync
Message:

vboxinstaller.py: Propagate skipped status from sub-driver.

File:
1 edited

Legend:

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

    r56295 r56722  
    5050# Validation Kit imports.
    5151from common             import utils, webutils;
     52from common.constants   import rtexitcode;
    5253from testdriver         import reporter;
    5354from testdriver.base    import TestDriverBase;
     
    177178        fRc = True;
    178179        if 'execute' not in self.asActions and 'all' not in self.asActions:
    179             fRc = self._executeSubDriver([ 'cleanup-after', ]);
     180            fRc = self._executeSubDriver([ 'cleanup-after', ], fMaySkip = False);
    180181
    181182        if not self._killAllVBoxProcesses():
     
    199200        based cleanup and finally swipe the scene with the heavy artillery.
    200201        """
    201         fRc1 = self._executeSubDriver([ 'abort', ]);
     202        fRc1 = self._executeSubDriver([ 'abort', ], fMaySkip = False);
    202203        fRc2 = TestDriverBase.actionAbort(self);
    203204        fRc3 = self._killAllVBoxProcesses();
     
    329330        return False;
    330331
    331     def _executeSync(self, asArgs):
     332    def _executeSync(self, asArgs, fMaySkip = False):
    332333        """
    333334        Executes a child process synchronously.
    334         Returns True if the process executed successfully and returned 0,
    335         otherwise False is returned.
     335
     336        Returns True if the process executed successfully and returned 0.
     337        Returns None if fMaySkip is true and the child exits with RTEXITCODE_SKIPPED.
     338        Returns False for all other cases.
    336339        """
    337340        reporter.log('Executing: %s' % (asArgs, ));
     
    343346            return False;
    344347        reporter.log('Exit code: %s (%s)' % (iRc, asArgs));
     348        if fMaySkip and iRc == rtexitcode.RTEXITCODE_SKIPPED:
     349            return None;
    345350        return iRc is 0;
    346351
     
    362367        return (iRc is 0, iRc);
    363368
    364     def _executeSubDriver(self, asActions):
     369    def _executeSubDriver(self, asActions, fMaySkip = True):
    365370        """
    366371        Execute the sub testdriver with the specified action.
     
    369374        asArgs.append('--no-wipe-clean');
    370375        asArgs.extend(asActions);
    371         return self._executeSync(asArgs);
     376        return self._executeSync(asArgs, fMaySkip = fMaySkip);
    372377
    373378    def _maybeUnpackArchive(self, sMaybeArchive, fNonFatal = False):
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