diff --git a/autopkgtest.py b/autopkgtest.py index 6e30adc..c2ad5f9 100644 --- a/autopkgtest.py +++ b/autopkgtest.py @@ -321,7 +321,10 @@ class AutoPackageTest(object): query['marker'] = query['prefix'] + latest_run_id # request new results from swift - url = os.path.join(swift_url, 'autopkgtest-' + self.series) + container = 'autopkgtest-' + self.series + if self.britney.options.adt_ppas: + container += '-' + self.britney.options.adt_ppas[-1].replace('/', '-') + url = os.path.join(swift_url, container) url += '?' + urllib.parse.urlencode(query) try: f = urlopen(url) @@ -341,7 +344,7 @@ class AutoPackageTest(object): for p in result_paths: self.fetch_one_result( - os.path.join(swift_url, 'autopkgtest-' + self.series, p, 'result.tar'), src, arch) + os.path.join(swift_url, container, p, 'result.tar'), src, arch) fetch_swift_results._done = set() diff --git a/britney.conf b/britney.conf index 2b8bf45..99991ec 100644 --- a/britney.conf +++ b/britney.conf @@ -69,8 +69,8 @@ ADT_ARCHES = amd64 i386 armhf ppc64el ADT_AMQP = amqp://test_request:password@162.213.33.228 # Swift base URL with the results (must be publicly readable and browsable) ADT_SWIFT_URL = https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac -# space separate list of PPAs to add for test requests; the *last* one -# determines the swift container name +# space separate list of PPAs to add for test requests and for polling results; +# the *last* one determines the swift container name ADT_PPAS = BOOTTEST_ENABLE = no diff --git a/tests/test_autopkgtest.py b/tests/test_autopkgtest.py index ed2ccf3..003e39b 100755 --- a/tests/test_autopkgtest.py +++ b/tests/test_autopkgtest.py @@ -1562,6 +1562,20 @@ class T(TestBase): 'debci-series-%s:lightgreen {"ppas": ["joe/foo", "awesome-developers/staging"], "triggers": ["lightgreen/2"]}' % arch in self.amqp_requests) self.assertEqual(len(self.amqp_requests), 2) + # 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/amd64/l/lightgreen/20150101_100101@': (0, 'lightgreen 2', tr('lightgreen/2')), + }}) + + self.do_test( + [], + {'lightgreen': (True, {'lightgreen 2': {'i386': 'PASS', 'amd64': 'PASS'}})}, + {'lightgreen': [('old-version', '1'), ('new-version', '2')]} + ) + self.assertEqual(self.amqp_requests, set()) + self.assertEqual(self.pending_requests, {}) + if __name__ == '__main__': unittest.main()