示例#1
0
 def run(self):
     if not Mock.is_available():
         self.set_passed(self.PENDING,
                         "No installation test done (mock unavailable)")
         return
     if Settings.nobuild:
         bad_ones = self.check_build_installed()
         if bad_ones == []:
             self.set_passed(self.PASS)
         else:
             bad_ones = list(set(bad_ones))
             self.set_passed(self.FAIL,
                             '--no-build: package(s) not installed')
             self.log.info('Packages required by --no-build are'
                           ' not installed: ' + ', '.join(bad_ones))
         return
     _mock_root_setup('While installing built packages', force=True)
     rpms = Mock.get_package_rpm_paths(self.spec)
     rpms.extend(
         Mock.get_package_debuginfo_paths(self.spec.get_package_nvr()))
     self.log.info('Installing built package(s)')
     output = Mock.install(rpms)
     if not output:
         self.set_passed(self.PASS)
     else:
         attachments = [self.Attachment('Installation errors', output, 3)]
         self.set_passed(self.FAIL, "Installation errors (see attachment)",
                         attachments)
示例#2
0
 def run(self):
     if not Mock.is_available():
         self.set_passed(self.PENDING,
                         "No installation test done (mock unavailable)")
         return
     if Settings.nobuild:
         bad_ones = self.check_build_installed()
         if bad_ones == []:
             self.set_passed(self.PASS)
         else:
             bad_ones = list(set(bad_ones))
             self.set_passed(self.FAIL,
                             '--no-build: package(s) not installed')
             self.log.info('Packages required by --no-build are'
                           ' not installed: ' + ', '.join(bad_ones))
         return
     _mock_root_setup('While installing built packages', force=True)
     rpms = Mock.get_package_rpm_paths(self.spec)
     rpms.extend(
         Mock.get_package_debuginfo_paths(self.spec.get_package_nvr()))
     self.log.info('Installing built package(s)')
     output = Mock.install(rpms)
     if not output:
         self.set_passed(self.PASS)
     else:
         attachments = [
             self.Attachment('Installation errors', output, 3)]
         self.set_passed(self.FAIL,
                         "Installation errors (see attachment)",
                         attachments)
示例#3
0
 def run(self):
     if not self.checks.checkdict['CheckPackageInstalls'].is_passed:
         self.set_passed(self.NA)
         return self.NA
     rpms = Mock.get_package_debuginfo_paths(self.spec.get_package_nvr())
     if not rpms:
         self.set_passed(self.NA)
         return self.NA
     no_errors, retcode = self.rpmlint_rpms(rpms)
     text = 'No rpmlint messages.' if no_errors else \
                      'There are rpmlint messages (see attachment).'
     attachments = \
         [self.Attachment('Rpmlint (debuginfo)', retcode + '\n', 6)]
     self.set_passed(self.PASS, text, attachments)
示例#4
0
 def run(self):
     if not self.checks.checkdict['CheckPackageInstalls'].is_passed:
         self.set_passed(self.NA)
         return self.NA
     rpms = Mock.get_package_debuginfo_paths(self.spec.get_package_nvr())
     if not rpms:
         self.set_passed(self.NA)
         return self.NA
     no_errors, retcode = self.rpmlint_rpms(rpms)
     text = 'No rpmlint messages.' if no_errors else \
                      'There are rpmlint messages (see attachment).'
     attachments = \
         [self.Attachment('Rpmlint (debuginfo)', retcode + '\n', 6)]
     self.set_passed(self.PASS, text, attachments)
示例#5
0
 def run(self):
     if not Mock.is_available():
         self.set_passed(self.NA)
         return
     if self.checks.checkdict['CheckPackageInstalls'].is_passed:
         rpms = Mock.get_package_rpm_paths(self.spec)
         rpms.extend(
             Mock.get_package_debuginfo_paths(self.spec.get_package_nvr()))
         no_errors, retcode = Mock.rpmlint_rpms(rpms)
         text = 'No rpmlint messages.' if no_errors else \
                          'There are rpmlint messages (see attachment).'
         attachments = \
             [self.Attachment('Rpmlint (installed packages)',
                              retcode + '\n', 7)]
         self.set_passed(self.PASS, text, attachments)
     else:
         self.set_passed(self.FAIL, 'Mock build failed')
示例#6
0
 def run(self):
     if not Mock.is_available():
         self.set_passed(self.NA)
         return
     if self.checks.checkdict['CheckPackageInstalls'].is_passed:
         rpms = Mock.get_package_rpm_paths(self.spec)
         rpms.extend(
             Mock.get_package_debuginfo_paths(self.spec.get_package_nvr()))
         no_errors, retcode = Mock.rpmlint_rpms(rpms)
         text = 'No rpmlint messages.' if no_errors else \
                          'There are rpmlint messages (see attachment).'
         attachments = \
             [self.Attachment('Rpmlint (installed packages)',
                              retcode + '\n', 7)]
         self.set_passed(self.PASS, text, attachments)
     else:
         self.set_passed(self.FAIL, 'Mock build failed')