VirtualBox

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


Ignore:
Timestamp:
Apr 20, 2020 7:51:06 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
137368
Message:

Validation Kit/Guest Additions: Make sure to update package sources / lists before installing stuff.

File:
1 edited

Legend:

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

    r83774 r83839  
    343343        if oTestVm.sKind.startswith('Debian') \
    344344        or oTestVm.sKind.startswith('Ubuntu'):
    345             fRc = self.txsRunTest(oTxsSession, 'Installing Kernel headers', 5 * 60 *1000,
    346                                   '/usr/bin/apt-get', ('/usr/bin/apt-get', 'install', '-y', 'linux-headers-generic'),
     345            fRc = self.txsRunTest(oTxsSession, 'Updating package sources', 5 * 60 *1000,
     346                                  '/usr/bin/apt-get', ('/usr/bin/apt-get', 'update'),
    347347                                  fCheckSessionStatus = True);
    348             if not fRc:
    349                 reporter.error('Error installing Kernel headers');
    350             fRc = self.txsRunTest(oTxsSession, 'Installing Guest Additions depdendencies', 5 * 60 *1000, \
    351                                   '/usr/bin/apt-get', ('/usr/bin/apt-get', 'install', '-y', 'build-essential', 'perl'),
    352                                   fCheckSessionStatus = True);
    353             if not fRc:
    354                 reporter.error('Error installing additional installer dependencies');
     348            if fRc:
     349                fRc = self.txsRunTest(oTxsSession, 'Installing Kernel headers', 5 * 60 *1000,
     350                                      '/usr/bin/apt-get', ('/usr/bin/apt-get', 'install', '-y', 'linux-headers-generic'),
     351                                      fCheckSessionStatus = True);
     352            if fRc:
     353                fRc = self.txsRunTest(oTxsSession, 'Installing Guest Additions depdendencies', 5 * 60 *1000, \
     354                                      '/usr/bin/apt-get', ('/usr/bin/apt-get', 'install', '-y', 'build-essential', 'perl'),
     355                                      fCheckSessionStatus = True);
    355356        elif oTestVm.sKind.startswith('OL') \
    356357        or   oTestVm.sKind.startswith('Oracle') \
     
    358359        or   oTestVm.sKind.startswith('Redhat') \
    359360        or   oTestVm.sKind.startswith('Cent'):
    360             fRc = self.txsRunTest(oTxsSession, 'Installing Kernel headers', 5 * 60 *1000,
    361                                   '/usr/bin/yum', ('/usr/bin/yum', '-y', 'install', 'kernel-headers'),
    362                                   fCheckSessionStatus = True);
    363             if not fRc:
    364                 reporter.error('Error installing Kernel headers');
    365             fRc = self.txsRunTest(oTxsSession, 'Installing Guest Additions depdendencies', 5 * 60 *1000, \
    366                                   '/usr/bin/yum', ('/usr/bin/yum', '-y', 'install', \
     361            fRc = self.txsRunTest(oTxsSession, 'Updating package sources', 5 * 60 *1000,
     362                                               '/usr/bin/yum', ('/usr/bin/yum', 'update'),
     363                                               fCheckSessionStatus = True);
     364            if fRc:
     365                fRc = self.txsRunTest(oTxsSession, 'Installing Kernel headers', 5 * 60 *1000,
     366                                      '/usr/bin/yum', ('/usr/bin/yum', '-y', 'install', 'kernel-headers'),
     367                                      fCheckSessionStatus = True);
     368            if fRc:
     369                fRc = self.txsRunTest(oTxsSession, 'Installing Guest Additions depdendencies', 5 * 60 *1000, \
     370                                      '/usr/bin/yum', ('/usr/bin/yum', '-y', 'install', \
    367371                                                   'make', 'automake', 'gcc', 'kernel-devel', 'dkms', 'bzip2', 'perl'),
    368                                   fCheckSessionStatus = True);
    369             if not fRc:
    370                 reporter.error('Error installing additional installer dependencies');
     372                                      fCheckSessionStatus = True);
    371373        else:
    372374            reporter.error('Installing Linux Additions for kind "%s" is not supported yet' % oTestVm.sKind);
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