Packages need passing tests on all tested architectures to receive the bounty

This commit is contained in:
Paul Gevers 2018-04-16 21:29:09 +02:00
parent 7e8ec20bc1
commit 022d6ed564
No known key found for this signature in database
GPG Key ID: 9C5C99EB05BD750A

View File

@ -194,7 +194,7 @@ class AutopkgtestPolicy(BasePolicy):
def apply_policy_impl(self, tests_info, suite, source_name, source_data_tdist, source_data_srcdist, excuse): def apply_policy_impl(self, tests_info, suite, source_name, source_data_tdist, source_data_srcdist, excuse):
# initialize # initialize
verdict = PolicyVerdict.PASS verdict = PolicyVerdict.PASS
src_has_own_test = False elegible_for_bounty = False
# skip/delay autopkgtests until new package is built somewhere # skip/delay autopkgtests until new package is built somewhere
binaries_info = self.britney.sources[suite][source_name] binaries_info = self.britney.sources[suite][source_name]
@ -244,11 +244,10 @@ class AutopkgtestPolicy(BasePolicy):
if not r - {'RUNNING', 'RUNNING-ALWAYSFAIL'}: if not r - {'RUNNING', 'RUNNING-ALWAYSFAIL'}:
testver = None testver = None
# Keep track if this source package has tests of its own for the # A source package is elegible for the bounty if it has tests
# bounty system, but only if at least one arch has something else than # of its own that pass on all tested architectures.
# running or alwaysfail if testsrc == source_name and r == {'PASS'}:
if testsrc == source_name and r - {'RUNNING', 'RUNNING-ALWAYSFAIL', 'ALWAYSFAIL'}: elegible_for_bounty = True
src_has_own_test = True
if testver: if testver:
testname = '%s/%s' % (testsrc, testver) testname = '%s/%s' % (testsrc, testver)
@ -308,7 +307,7 @@ class AutopkgtestPolicy(BasePolicy):
else: else:
excuse.addreason('autopkgtest') excuse.addreason('autopkgtest')
if self.options.adt_success_bounty and verdict == PolicyVerdict.PASS and src_has_own_test: if self.options.adt_success_bounty and verdict == PolicyVerdict.PASS and elegible_for_bounty:
excuse.add_bounty('autopkgtest', int(self.options.adt_success_bounty)) excuse.add_bounty('autopkgtest', int(self.options.adt_success_bounty))
if self.options.adt_regression_penalty and \ if self.options.adt_regression_penalty and \
verdict in {PolicyVerdict.REJECTED_PERMANENTLY, PolicyVerdict.REJECTED_TEMPORARILY}: verdict in {PolicyVerdict.REJECTED_PERMANENTLY, PolicyVerdict.REJECTED_TEMPORARILY}: