From b20421efc3bcc02cc042cf8b4b7e3811784fbbfc Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 4 Feb 2016 21:54:53 +0100 Subject: [PATCH] Add retry links to PPA excuses autopkgtest-retrier supports "ppa=" GET arguments now. --- britney.py | 13 +++++++------ tests/test_autopkgtest.py | 9 +++++---- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/britney.py b/britney.py index 6d66d74..ee4df94 100755 --- a/britney.py +++ b/britney.py @@ -1959,12 +1959,13 @@ class Britney(object): kwargs['history_url'] = cloud_url % { 'h': srchash(adtsrc), 's': adtsrc, 'r': self.options.series, 'a': arch} - if status == 'REGRESSION': - kwargs['retry_url'] = 'https://autopkgtest.ubuntu.com/retry.cgi?' + \ - urlencode({'release': self.options.series, - 'arch': arch, - 'package': adtsrc, - 'trigger': '%s/%s' % (e.name, e.ver[1])}) + if status == 'REGRESSION': + kwargs['retry_url'] = 'https://autopkgtest.ubuntu.com/retry.cgi?' + \ + urlencode([('release', self.options.series), + ('arch', arch), + ('package', adtsrc), + ('trigger', '%s/%s' % (e.name, e.ver[1]))] + + [('ppa', p) for p in self.options.adt_ppas]) e.addtest('autopkgtest', '%s %s' % (adtsrc, adtver), arch, status, log_url, **kwargs) diff --git a/tests/test_autopkgtest.py b/tests/test_autopkgtest.py index 90e0ee0..d1ae6a1 100755 --- a/tests/test_autopkgtest.py +++ b/tests/test_autopkgtest.py @@ -1625,13 +1625,14 @@ class T(TestBase): # add results to PPA specific swift container self.swift.set_results({'autopkgtest-series-awesome-developers-staging': { - 'series/i386/l/lightgreen/20150101_100100@': (0, 'lightgreen 2', tr('lightgreen/2')), + 'series/i386/l/lightgreen/20150101_100000@': (0, 'lightgreen 1', tr('passedbefore/1')), + 'series/i386/l/lightgreen/20150101_100100@': (4, 'lightgreen 2', tr('lightgreen/2')), 'series/amd64/l/lightgreen/20150101_100101@': (0, 'lightgreen 2', tr('lightgreen/2')), }}) exc = self.do_test( [], - {'lightgreen': (True, {'lightgreen 2': {'i386': 'PASS', 'amd64': 'PASS'}})}, + {'lightgreen': (False, {'lightgreen 2': {'i386': 'REGRESSION', 'amd64': 'PASS'}})}, {'lightgreen': [('old-version', '1'), ('new-version', '2')]} )[1] self.assertEqual(exc['lightgreen']['tests'], {'autopkgtest': @@ -1641,11 +1642,11 @@ class T(TestBase): None, 'http://localhost:18085/autopkgtest-series-awesome-developers-staging/series/amd64/l/lightgreen/20150101_100101@/artifacts.tar.gz', None], - 'i386': ['PASS', + 'i386': ['REGRESSION', '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', - None]} + 'https://autopkgtest.ubuntu.com/retry.cgi?release=series&arch=i386&package=lightgreen&trigger=lightgreen%2F2&ppa=joe%2Ffoo&ppa=awesome-developers%2Fstaging']} }}) self.assertEqual(self.amqp_requests, set()) self.assertEqual(self.pending_requests, {})