VirtualBox

Ignore:
Timestamp:
Mar 3, 2023 5:44:56 PM (2 years ago)
Author:
vboxsync
Message:

ValidationKit: tdAddBasic1: Add --no-reboot-after-install option for Additions which do not require guest reboot after installation, bugref:10359.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/additions/tdAddBasic1.py

    r98832 r98833  
    8181        # Path pointing to the Guest Additions on the (V)ISO file.
    8282        self.sGstPathGaPrefix = '';
     83
     84        # Wether to reboot guest after Guest Additions installation.
     85        self.fRebbotAfterInstall = True;
    8386
    8487        self.addSubTestDriver(SubTstDrvAddGuestCtrl(self));
     
    112115            self.parseOption(['--virt-modes', 'hwvirt'], 0);
    113116            self.parseOption(['--cpu-counts', '1'], 0);
     117
     118        elif asArgs[iArg] == '--no-reboot-after-install':
     119            self.fRebbotAfterInstall = False;
     120            reporter.log('Guest will not be rebooted after Guest Additions installation, ' +
     121                         'kernel modules and user services should be reloaded automatically without reboot');
    114122
    115123        else:
     
    509517        # Do the final reboot to get the just installed Guest Additions up and running.
    510518        if fRc:
    511             reporter.testStart('Rebooting guest w/ updated Guest Additions active');
    512             (fRc, oTxsSession) = self.txsRebootAndReconnectViaTcp(oSession, oTxsSession, cMsTimeout = 15 * 60 * 1000);
     519            if self.fRebbotAfterInstall:
     520                reporter.testStart('Rebooting guest w/ updated Guest Additions active');
     521                (fRc, oTxsSession) = self.txsRebootAndReconnectViaTcp(oSession, oTxsSession, cMsTimeout = 15 * 60 * 1000);
     522                if not fRc:
     523                    reporter.testFailure('Rebooting and reconnecting to TXS service failed');
     524            else:
     525                reporter.log('Skipping guest reboot after Guest Additions installation as requested');
     526                fRc = self.txsRunTest(oTxsSession, 'Check Guest Additions kernel modules status', 5 * 60 * 1000,
     527                                      self.getGuestSystemShell(oTestVm),
     528                                      (self.getGuestSystemShell(oTestVm),
     529                                      '/sbin/rcvboxadd', 'status-kernel'));
     530                iRc = self.getAdditionsInstallerResult(oTxsSession);
     531                if fRc and iRc == 0:
     532                    fRc = self.txsRunTest(oTxsSession, 'Check Guest Additions user services status', 5 * 60 * 1000,
     533                                          self.getGuestSystemShell(oTestVm),
     534                                          (self.getGuestSystemShell(oTestVm),
     535                                          '/sbin/rcvboxadd', 'status-user'));
     536                    iRc = self.getAdditionsInstallerResult(oTxsSession);
     537                    if fRc and iRc == 0:
     538                        pass;
     539                    else:
     540                        fRc = False;
     541                        reporter.testFailure('User services were not reloaded');
     542                else:
     543                    fRc = False;
     544                    reporter.testFailure('Kernel modules were not reloaded');
    513545            if fRc:
    514                 pass
    515             else:
    516                 reporter.testFailure('Rebooting and reconnecting to TXS service failed');
    517             reporter.testDone();
     546                reporter.testDone();
    518547
    519548        return (fRc, oTxsSession);
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