mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-07-23 14:31:31 +00:00
Set artifacts link if ADT_PPAS is defined.
This commit is contained in:
parent
b17221164f
commit
e412932daf
@ -1965,8 +1965,11 @@ class Britney(object):
|
||||
for arch, (status, log_url) in arch_status.items():
|
||||
history_url = cloud_url % {'h': srchash(adtsrc), 's': adtsrc,
|
||||
'r': self.options.series, 'a': arch}
|
||||
artifact_url = None
|
||||
if self.options.adt_ppas:
|
||||
artifact_url = log_url.replace('log.gz', 'artifact.tar.gz')
|
||||
e.addtest('autopkgtest', '%s %s' % (adtsrc, adtver),
|
||||
arch, status, log_url, history_url)
|
||||
arch, status, log_url, history_url, artifact_url)
|
||||
|
||||
# hints can override failures
|
||||
if not passed:
|
||||
|
17
excuse.py
17
excuse.py
@ -182,9 +182,15 @@ class Excuse(object):
|
||||
for pkg in sorted(self.tests[testtype]):
|
||||
archmsg = []
|
||||
for arch in sorted(self.tests[testtype][pkg]):
|
||||
status, log_url, history_url = self.tests[testtype][pkg][arch]
|
||||
archmsg.append('<a href="%s">%s</a>: <a href="%s">%s</a>' %
|
||||
(history_url or log_url, arch, log_url, EXCUSES_LABELS[status]))
|
||||
status, log_url, history_url, artifact_url = self.tests[testtype][pkg][arch]
|
||||
label = EXCUSES_LABELS[status]
|
||||
if artifact_url:
|
||||
message = '{arch}: <a href="{log_url}">{label}</a> <a href="{artifact_url}">[artifacts]</a>'
|
||||
elif history_url:
|
||||
message = '<a href="{history_url}">{arch}</a>: <a href="{log_url}">{label}</a>'
|
||||
else:
|
||||
message = '{arch}: <a href="{log_url}">{label}</a>'
|
||||
archmsg.append(message.format(**locals()))
|
||||
res = res + ("<li>%s for %s: %s</li>\n" % (testtype, pkg, ', '.join(archmsg)))
|
||||
|
||||
for x in self.htmlline:
|
||||
@ -215,9 +221,9 @@ class Excuse(object):
|
||||
""""adding reason"""
|
||||
self.reason[reason] = 1
|
||||
|
||||
def addtest(self, type_, package, arch, state, log_url, history_url=None):
|
||||
def addtest(self, type_, package, arch, state, log_url, history_url=None, artifact_url=None):
|
||||
"""Add test result"""
|
||||
self.tests.setdefault(type_, {}).setdefault(package, {})[arch] = [state, log_url, history_url]
|
||||
self.tests.setdefault(type_, {}).setdefault(package, {})[arch] = [state, log_url, history_url, artifact_url]
|
||||
|
||||
# TODO merge with html()
|
||||
def text(self):
|
||||
@ -276,4 +282,3 @@ class Excuse(object):
|
||||
excusedata["is-candidate"] = self.is_valid
|
||||
excusedata["tests"] = self.tests
|
||||
return excusedata
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user