def run(self): if self.checks.checkdict['CheckPackageInstalls'].is_passed: rpms = Mock.get_package_rpm_paths(self.spec) 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', 5)] self.set_passed(self.PASS, text, attachments) else: self.set_passed(self.FAIL, 'Mock build failed')
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')
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')