mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-04-14 12:41:15 +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
|
||||
verdict = PolicyVerdict.PASS
|
||||
src_has_own_test = False
|
||||
cloud_url = self.options.adt_ci_url + "packages/%(h)s/%(s)s/%(r)s/%(a)s"
|
||||
for (testsrc, testver) in sorted(pkg_arch_result):
|
||||
arch_results = pkg_arch_result[(testsrc, testver)]
|
||||
@ -215,6 +216,11 @@ class AutopkgtestPolicy(BasePolicy):
|
||||
if not r - {'RUNNING', 'RUNNING-ALWAYSFAIL'}:
|
||||
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 = []
|
||||
for arch in sorted(arch_results):
|
||||
(status, log_url) = arch_results[arch]
|
||||
@ -271,7 +277,7 @@ class AutopkgtestPolicy(BasePolicy):
|
||||
else:
|
||||
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))
|
||||
if self.options.adt_regression_penalty and verdict == PolicyVerdict.REJECTED_PERMANENTLY:
|
||||
excuse.add_penalty('autopkgtest', int(self.options.adt_regression_penalty))
|
||||
|
Loading…
x
Reference in New Issue
Block a user