VirtualBox

Changeset 98269 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
Jan 24, 2023 9:48:36 AM (23 months ago)
Author:
vboxsync
Message:

Validation Kit/testdriver: Added a new option "--vbox-vm-no-terminate" that leaves the current VM up and running after a test driver run. This is handy to have for manual investigation work during test driver development and should get rid of the custom hacks (some) test drivers have to perform the same result.

File:
1 edited

Legend:

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

    r98103 r98269  
    905905        self.fAlwaysUploadRecordings  = False; # Only upload recording files on failure by default.
    906906        self.fEnableDebugger          = True;
     907        self.fVmNoTerminate           = False; # Whether to skip exit handling and tearing down the VMs.
    907908        self.adRecordingFiles         = [];
    908909        self.fRecordingEnabled        = False; # Don't record by default (yet).
     
    18301831        reporter.log('      Explicitly specify 0 for unlimited size.');
    18311832        reporter.log('      Default: 195 MB.');
     1833        reporter.log('  --vbox-vm-no-terminate');
     1834        reporter.log('      Does not terminate the test VM after running the test driver.');
    18321835        if self.oTestVmSet is not None:
    18331836            self.oTestVmSet.showUsage();
     
    19601963                raise base.InvalidOption('The "--vbox-recording-max-file-size" takes an argument');
    19611964            self.cMbRecordingMax = int(asArgs[iArg]);
     1965        elif asArgs[iArg] == '--vbox-vm-no-terminate':
     1966            self.fVmNoTerminate = True;
    19621967        else:
    19631968            # Relevant for selecting VMs to test?
     
    20832088        Stop VBoxSVC if we've started it.
    20842089        """
    2085         if self.oVBoxSvcProcess is not None:
     2090        if  not self.fVmNoTerminate \
     2091        and self.oVBoxSvcProcess is not None:
    20862092            reporter.log('*** Shutting down the VBox API... (iRc=%s)' % (iRc,));
    20872093            self._powerOffAllVms();
     
    32853291        kill the VM process.
    32863292        """
     3293
    32873294        reporter.log2('terminateVmBySession: oSession=%s (pid=%s) oProgress=%s' % (oSession.sName, oSession.getPid(), oProgress));
     3295
     3296        if self.fVmNoTerminate:
     3297            reporter.log('terminateVmBySession: Skipping, as --vbox-vm-no-terminate was specified');
     3298            # Make sure that we still process the events the VM needs.
     3299            self.sleep(24 * 60 * 60 * 1000);
    32883300
    32893301        # Call getPid first to make sure the PID is cached in the wrapper.
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