mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-05-24 08:51:31 +00:00
Only give bounty on passing packages if the package has a test suite itself
This commit is contained in:
parent
d975b2fc39
commit
41c4729506
@ -203,6 +203,7 @@ class AutopkgtestPolicy(BasePolicy):
|
|||||||
|
|
||||||
# add test result details to Excuse
|
# add test result details to Excuse
|
||||||
verdict = PolicyVerdict.PASS
|
verdict = PolicyVerdict.PASS
|
||||||
|
src_has_own_test = False
|
||||||
cloud_url = self.options.adt_ci_url + "packages/%(h)s/%(s)s/%(r)s/%(a)s"
|
cloud_url = self.options.adt_ci_url + "packages/%(h)s/%(s)s/%(r)s/%(a)s"
|
||||||
for (testsrc, testver) in sorted(pkg_arch_result):
|
for (testsrc, testver) in sorted(pkg_arch_result):
|
||||||
arch_results = pkg_arch_result[(testsrc, testver)]
|
arch_results = pkg_arch_result[(testsrc, testver)]
|
||||||
@ -215,6 +216,11 @@ 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
|
||||||
|
# bounty system
|
||||||
|
if testsrc == source_name:
|
||||||
|
src_has_own_test = True
|
||||||
|
|
||||||
html_archmsg = []
|
html_archmsg = []
|
||||||
for arch in sorted(arch_results):
|
for arch in sorted(arch_results):
|
||||||
(status, log_url) = arch_results[arch]
|
(status, log_url) = arch_results[arch]
|
||||||
@ -271,7 +277,7 @@ class AutopkgtestPolicy(BasePolicy):
|
|||||||
else:
|
else:
|
||||||
excuse.addreason('autopkgtest')
|
excuse.addreason('autopkgtest')
|
||||||
|
|
||||||
if self.options.adt_success_bounty and verdict == PolicyVerdict.PASS:
|
if self.options.adt_success_bounty and verdict == PolicyVerdict.PASS and src_has_own_test:
|
||||||
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 verdict == PolicyVerdict.REJECTED_PERMANENTLY:
|
if self.options.adt_regression_penalty and verdict == PolicyVerdict.REJECTED_PERMANENTLY:
|
||||||
excuse.add_penalty('autopkgtest', int(self.options.adt_regression_penalty))
|
excuse.add_penalty('autopkgtest', int(self.options.adt_regression_penalty))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user