mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-02-13 23:38:20 +00:00
autopkgtest: Don't request tests for new packages that FTBFS
These are treated separately by britney ('no-binaries' vs. 'missing-builds').
This commit is contained in:
parent
d366288a7b
commit
fe627aaa15
@ -161,7 +161,8 @@ class AutopkgtestPolicy(BasePolicy):
|
||||
|
||||
def apply_policy_impl(self, tests_info, suite, source_name, source_data_tdist, source_data_srcdist, excuse):
|
||||
# skip/delay autopkgtests until package is built
|
||||
if excuse.missing_builds or 'depends' in excuse.reason:
|
||||
binaries_info = self.britney.sources[suite][source_name]
|
||||
if excuse.missing_builds or not binaries_info.binaries or 'depends' in excuse.reason:
|
||||
self.log('%s has missing builds or is uninstallable, skipping autopkgtest policy' % excuse.name)
|
||||
return PolicyVerdict.REJECTED_TEMPORARILY
|
||||
|
||||
|
@ -665,6 +665,25 @@ class T(TestBase):
|
||||
self.assertEqual(self.amqp_requests, set())
|
||||
self.assertEqual(self.pending_requests, {})
|
||||
|
||||
def test_unbuilt_not_in_testing(self):
|
||||
'''Unbuilt package should not trigger tests or get considered (package not in testing)'''
|
||||
|
||||
self.sourceppa_cache['lime'] = {'1': ''}
|
||||
|
||||
self.data.add_src('lime', True, {'Version': '1', 'Testsuite': 'autopkgtest'})
|
||||
exc = self.do_test(
|
||||
# unbuilt unstable version
|
||||
[],
|
||||
{'lime': (False, {})},
|
||||
{'lime': [('old-version', '-'), ('new-version', '1'),
|
||||
('reason', 'no-binaries'),
|
||||
]
|
||||
})[1]
|
||||
# autopkgtest should not be triggered for unbuilt pkg
|
||||
self.assertEqual(exc['lime']['policy_info']['autopkgtest'], {})
|
||||
self.assertEqual(self.amqp_requests, set())
|
||||
self.assertEqual(self.pending_requests, {})
|
||||
|
||||
def test_partial_unbuilt(self):
|
||||
'''Unbuilt package on some arches should not trigger tests'''
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user