mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-03-13 20:31:12 +00:00
autopkgtest: When we're missing builds on non-adt arches only, go ahead and run the tests
Again the rest of britney will take care of invalidating the excuse if it needs to.
This commit is contained in:
parent
f63ec075f4
commit
0329fb28e2
@ -177,12 +177,13 @@ class AutopkgtestPolicy(BasePolicy):
|
||||
binaries_info = self.britney.sources[suite][source_name]
|
||||
unsat_deps = excuse.unsat_deps.copy()
|
||||
non_adt_arches = set(self.options.architectures) - set(self.adt_arches)
|
||||
interesting_missing_builds = set(excuse.missing_builds) - non_adt_arches
|
||||
for arch in set(self.options.break_arches) | non_adt_arches:
|
||||
try:
|
||||
del unsat_deps[arch]
|
||||
except KeyError:
|
||||
pass
|
||||
if excuse.missing_builds or not binaries_info.binaries or unsat_deps:
|
||||
if interesting_missing_builds or not binaries_info.binaries or unsat_deps:
|
||||
self.log('%s has missing builds or is uninstallable, skipping autopkgtest policy' % excuse.name)
|
||||
return PolicyVerdict.REJECTED_TEMPORARILY
|
||||
|
||||
|
@ -311,6 +311,60 @@ class T(TestBase):
|
||||
self.assertNotIn('accepted: pink', upgrade_out)
|
||||
self.assertIn('SUCCESS (0/0)', upgrade_out)
|
||||
|
||||
def test_tests_requested_when_non_adt_arch_is_missing_build(self):
|
||||
''' When a package is unbuilt on an arch that isn't an ADT_ARCH,
|
||||
we should still request tests (but the package should remain a
|
||||
non-candidate unless it is in BREAK_ARCHES - see above test). '''
|
||||
self.sourceppa_cache['pink'] = {'2': ''}
|
||||
self.swift.set_results({'autopkgtest-series': {
|
||||
'series/amd64/p/pink/20150101_100000@': (0, 'pink 1', tr('pink/1')),
|
||||
'series/ppc64el/p/pink/20150101_100000@': (0, 'pink 1', tr('pink/1'))
|
||||
}})
|
||||
|
||||
self.data.add('pink',
|
||||
False,
|
||||
{'Version': '1',
|
||||
'Depends': 'libc6 (>= 0.9)',
|
||||
'Architecture': 'amd64'},
|
||||
testsuite='autopkgtest')
|
||||
self.data.add('pink',
|
||||
False,
|
||||
{'Version': '1',
|
||||
'Depends': 'libc6 (>= 0.9)',
|
||||
'Architecture': 'ppc64el'},
|
||||
testsuite='autopkgtest')
|
||||
# built in unstable on amd64 only, so ppc64el is missing-build
|
||||
self.data.add('pink',
|
||||
True,
|
||||
{'Version': '2',
|
||||
'Depends': 'libc6 (>= 0.9)',
|
||||
'Architecture': 'amd64'},
|
||||
testsuite='autopkgtest')
|
||||
exc = self.do_test(
|
||||
[],
|
||||
{'pink': (False, {})}
|
||||
)[1]
|
||||
|
||||
# we noticed the unsat dep
|
||||
self.assertEqual(exc['pink']['missing-builds']['on-architectures'],
|
||||
['ppc64el'])
|
||||
|
||||
# but still requested the tests
|
||||
self.assertEqual(self.pending_requests, {'pink/2': {'pink': ['amd64']}})
|
||||
self.assertEqual(self.amqp_requests, set(['debci-series-amd64:pink {"triggers": ["pink/2"]}']))
|
||||
self.assertEqual(exc['pink']['policy_info']['autopkgtest'],
|
||||
{'pink': {'amd64': ['RUNNING',
|
||||
'http://autopkgtest.ubuntu.com/running',
|
||||
'http://autopkgtest.ubuntu.com/packages/p/pink/series/amd64',
|
||||
None,
|
||||
None]}})
|
||||
|
||||
|
||||
with open(os.path.join(self.data.path, 'output', 'series', 'output.txt')) as f:
|
||||
upgrade_out = f.read()
|
||||
self.assertNotIn('accepted: pink', upgrade_out)
|
||||
self.assertIn('SUCCESS (0/0)', upgrade_out)
|
||||
|
||||
def test_no_request_for_excluded_arch(self):
|
||||
'''
|
||||
Does not request a test on an architecture for which the package
|
||||
|
Loading…
x
Reference in New Issue
Block a user