mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-04-19 07:01:28 +00:00
Add link to the autopkgtest artifacts for PPA runs
For PPA runs we don't have autopkgtest.u.c., thus stop linking to it and instead directly link to the test artifacts.
This commit is contained in:
commit
40d12bfc74
12
britney.py
12
britney.py
@ -1963,10 +1963,16 @@ class Britney(object):
|
||||
for passed, adtsrc, adtver, arch_status in autopkgtest.results(
|
||||
e.name, e.ver[1]):
|
||||
for arch, (status, log_url) in arch_status.items():
|
||||
history_url = cloud_url % {'h': srchash(adtsrc), 's': adtsrc,
|
||||
'r': self.options.series, 'a': arch}
|
||||
kwargs = {}
|
||||
if self.options.adt_ppas:
|
||||
if log_url.endswith('log.gz'):
|
||||
kwargs['artifact_url'] = log_url.replace('log.gz', 'artifacts.tar.gz')
|
||||
else:
|
||||
kwargs['history_url'] = cloud_url % {
|
||||
'h': srchash(adtsrc), 's': adtsrc,
|
||||
'r': self.options.series, 'a': arch}
|
||||
e.addtest('autopkgtest', '%s %s' % (adtsrc, adtver),
|
||||
arch, status, log_url, history_url)
|
||||
arch, status, log_url, **kwargs)
|
||||
|
||||
# hints can override failures
|
||||
if not passed:
|
||||
|
14
excuse.py
14
excuse.py
@ -182,9 +182,13 @@ 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]
|
||||
message = '<a href="{history_url}">{arch}</a>' if history_url else '{arch}'
|
||||
message += ': <a href="{log_url}">{label}</a>'
|
||||
if artifact_url:
|
||||
message += ' <a href="{artifact_url}">[artifacts]</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 +219,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):
|
||||
|
@ -194,10 +194,12 @@ class T(TestBase):
|
||||
{'darkgreen 2': {
|
||||
'amd64': ['RUNNING-ALWAYSFAIL',
|
||||
'http://autopkgtest.ubuntu.com/running.shtml',
|
||||
'http://autopkgtest.ubuntu.com/packages/d/darkgreen/series/amd64'],
|
||||
'http://autopkgtest.ubuntu.com/packages/d/darkgreen/series/amd64',
|
||||
None],
|
||||
'i386': ['RUNNING-ALWAYSFAIL',
|
||||
'http://autopkgtest.ubuntu.com/running.shtml',
|
||||
'http://autopkgtest.ubuntu.com/packages/d/darkgreen/series/i386']}}})
|
||||
'http://autopkgtest.ubuntu.com/packages/d/darkgreen/series/i386',
|
||||
None]}}})
|
||||
|
||||
self.assertEqual(self.pending_requests,
|
||||
{'darkgreen/2': {'darkgreen': ['amd64', 'i386']}})
|
||||
@ -1563,11 +1565,22 @@ class T(TestBase):
|
||||
else:
|
||||
sys.stdout.write(line)
|
||||
|
||||
self.do_test(
|
||||
exc = self.do_test(
|
||||
[('lightgreen', {'Version': '2'}, 'autopkgtest')],
|
||||
{'lightgreen': (True, {'lightgreen 2': {'amd64': 'RUNNING-ALWAYSFAIL'}})},
|
||||
{'lightgreen': [('old-version', '1'), ('new-version', '2')]}
|
||||
)
|
||||
)[1]
|
||||
self.assertEqual(exc['lightgreen']['tests'], {'autopkgtest':
|
||||
{'lightgreen 2': {
|
||||
'amd64': ['RUNNING-ALWAYSFAIL',
|
||||
'http://autopkgtest.ubuntu.com/running.shtml',
|
||||
None,
|
||||
None],
|
||||
'i386': ['RUNNING-ALWAYSFAIL',
|
||||
'http://autopkgtest.ubuntu.com/running.shtml',
|
||||
None,
|
||||
None]}
|
||||
}})
|
||||
|
||||
for arch in ['i386', 'amd64']:
|
||||
self.assertTrue('debci-series-%s:lightgreen {"triggers": ["lightgreen/2"], "ppas": ["joe/foo", "awesome-developers/staging"]}' % arch in self.amqp_requests or
|
||||
@ -1580,11 +1593,22 @@ class T(TestBase):
|
||||
'series/amd64/l/lightgreen/20150101_100101@': (0, 'lightgreen 2', tr('lightgreen/2')),
|
||||
}})
|
||||
|
||||
self.do_test(
|
||||
exc = self.do_test(
|
||||
[],
|
||||
{'lightgreen': (True, {'lightgreen 2': {'i386': 'PASS', 'amd64': 'PASS'}})},
|
||||
{'lightgreen': [('old-version', '1'), ('new-version', '2')]}
|
||||
)
|
||||
)[1]
|
||||
self.assertEqual(exc['lightgreen']['tests'], {'autopkgtest':
|
||||
{'lightgreen 2': {
|
||||
'amd64': ['PASS',
|
||||
'http://localhost:18085/autopkgtest-series-awesome-developers-staging/series/amd64/l/lightgreen/20150101_100101@/log.gz',
|
||||
None,
|
||||
'http://localhost:18085/autopkgtest-series-awesome-developers-staging/series/amd64/l/lightgreen/20150101_100101@/artifacts.tar.gz'],
|
||||
'i386': ['PASS',
|
||||
'http://localhost:18085/autopkgtest-series-awesome-developers-staging/series/i386/l/lightgreen/20150101_100100@/log.gz',
|
||||
None,
|
||||
'http://localhost:18085/autopkgtest-series-awesome-developers-staging/series/i386/l/lightgreen/20150101_100100@/artifacts.tar.gz']}
|
||||
}})
|
||||
self.assertEqual(self.amqp_requests, set())
|
||||
self.assertEqual(self.pending_requests, {})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user