VirtualBox

Changeset 83757 in vbox


Ignore:
Timestamp:
Apr 17, 2020 2:52:40 PM (5 years ago)
Author:
vboxsync
Message:

Validation Kit/Guest Additions: Added more error checking for executed guest tasks; also needed for Linux Additions to install kernel headers and stuff.

File:
1 edited

Legend:

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

    r82968 r83757  
    254254        #
    255255        if oTestVm.sKind not in ('WindowsNT4', 'Windows2000', 'WindowsXP', 'Windows2003'):
    256             self.txsRunTest(oTxsSession, 'VBoxCertUtil.exe', 1 * 60 * 1000, '${CDROM}/cert/VBoxCertUtil.exe',
    257                             ('${CDROM}/cert/VBoxCertUtil.exe', 'add-trusted-publisher', '${CDROM}/cert/vbox-sha1.cer'));
    258             self.txsRunTest(oTxsSession, 'VBoxCertUtil.exe', 1 * 60 * 1000, '${CDROM}/cert/VBoxCertUtil.exe',
    259                             ('${CDROM}/cert/VBoxCertUtil.exe', 'add-trusted-publisher', '${CDROM}/cert/vbox-sha256.cer'));
     256            fRc = self.txsRunTest(oTxsSession, 'VBoxCertUtil.exe', 1 * 60 * 1000, '${CDROM}/cert/VBoxCertUtil.exe',
     257                                  ('${CDROM}/cert/VBoxCertUtil.exe', 'add-trusted-publisher', '${CDROM}/cert/vbox-sha1.cer'));
     258            if not fRc \
     259            or oTxsSession.getResult() is False:
     260                reporter.error('Error installing SHA1 certificate');
     261            else:
     262                fRc = self.txsRunTest(oTxsSession, 'VBoxCertUtil.exe', 1 * 60 * 1000, '${CDROM}/cert/VBoxCertUtil.exe',
     263                                      ('${CDROM}/cert/VBoxCertUtil.exe', 'add-trusted-publisher',
     264                                       '${CDROM}/cert/vbox-sha256.cer'));
     265                if not fRc \
     266                or oTxsSession.getResult() is False:
     267                    reporter.error('Error installing SHA256 certificate');
    260268
    261269        #
     
    286294        #
    287295        # The actual install.
    288         # Enable installing the optional auto-logon modules (VBoxGINA/VBoxCredProv) + (Direct)3D support.
     296        # Enable installing the optional auto-logon modules (VBoxGINA/VBoxCredProv).
    289297        # Also tell the installer to produce the appropriate log files.
    290298        #
    291299        fRc = self.txsRunTest(oTxsSession, 'VBoxWindowsAdditions.exe', 5 * 60 * 1000, '${CDROM}/VBoxWindowsAdditions.exe',
    292300                              ('${CDROM}/VBoxWindowsAdditions.exe', '/S', '/l', '/with_autologon'));
    293         ## @todo For testing the installation (D)3D stuff ('/with_d3d') we need to boot up in safe mode.
    294301
    295302        #
    296303        # Reboot the VM and reconnect the TXS session.
    297304        #
    298         if fRc is True:
     305        if not fRc \
     306        or oTxsSession.getResult() is False:
     307            reporter.error('Error installing Windows Guest Additions (installer returned with exit code)')
     308        else:
    299309            (fRc, oTxsSession) = self.txsRebootAndReconnectViaTcp(oSession, oTxsSession, cMsTimeout = 3 * 60000);
    300 
    301310            if fRc is True:
    302311                # Add the Windows Guest Additions installer files to the files we want to download
     
    332341            fRc = self.txsRunTest(oTxsSession, 'Installing Kernel headers', 5 * 60 *1000,
    333342                                  '/usr/bin/apt-get', ('/usr/bin/apt-get', 'install', '-y', 'linux-headers-generic'));
    334             if not fRc:
     343            if not fRc \
     344            or oTxsSession.getResult() is False:
    335345                reporter.error('Error installing Kernel headers');
    336346            fRc = self.txsRunTest(oTxsSession, 'Installing Guest Additions depdendencies', 5 * 60 *1000, \
    337347                                  '/usr/bin/apt-get', ('/usr/bin/apt-get', 'install', '-y', 'build-essential', 'perl'));
    338             if not fRc:
     348            if not fRc \
     349            or oTxsSession.getResult() is False:
    339350                reporter.error('Error installing additional installer dependencies');
    340351        elif oTestVm.sKind.startswith('OL') \
     
    345356            fRc = self.txsRunTest(oTxsSession, 'Installing Kernel headers', 5 * 60 *1000,
    346357                                  '/usr/bin/yum', ('/usr/bin/yum', '-y', 'install', 'kernel-headers'));
    347             if not fRc:
     358            if not fRc \
     359            or oTxsSession.getResult() is False:
    348360                reporter.error('Error installing Kernel headers');
    349361            fRc = self.txsRunTest(oTxsSession, 'Installing Guest Additions depdendencies', 5 * 60 *1000, \
    350362                                  '/usr/bin/yum', ('/usr/bin/yum', '-y', 'install', \
    351363                                                   'make', 'automake', 'gcc', 'kernel-devel', 'dkms', 'bzip2', 'perl'));
    352             if not fRc:
     364            if not fRc \
     365            or oTxsSession.getResult() is False:
    353366                reporter.error('Error installing additional installer dependencies');
    354367        else:
     
    363376            fRc = self.txsRunTest(oTxsSession, 'VBoxLinuxAdditions.run', 5 * 60 * 1000,
    364377                '/bin/sh', ('/bin/sh', '${CDROM}/VBoxLinuxAdditions.run'));
    365             if not fRc:
     378            if not fRc \
     379            or oTxsSession.getResult() is False:
    366380                reporter.error('Installing Linux Additions failed (see log file for details)');
    367381
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