diff --git a/britney.py b/britney.py index d10a434..84c056f 100755 --- a/britney.py +++ b/britney.py @@ -1963,13 +1963,15 @@ 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} - artifact_url = None + kwargs = {} if self.options.adt_ppas: - artifact_url = log_url.replace('log.gz', 'artifacts.tar.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, artifact_url) + arch, status, log_url, **kwargs) # hints can override failures if not passed: diff --git a/excuse.py b/excuse.py index 0238798..3e05a06 100644 --- a/excuse.py +++ b/excuse.py @@ -184,12 +184,10 @@ class Excuse(object): for arch in sorted(self.tests[testtype][pkg]): 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 = '{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>' + 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)))