mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-05-13 19:41:29 +00:00
Silently skipping boottesting for sources not yet built on the allowed architectures (all and armhf).
This commit is contained in:
parent
ed31f1129b
commit
eeaf8e3deb
10
boottest.py
10
boottest.py
@ -75,6 +75,8 @@ class BootTest(object):
|
|||||||
"RUNNING": '<span style="background:#99ddff">Test in progress</span>',
|
"RUNNING": '<span style="background:#99ddff">Test in progress</span>',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ARCHITECTURES = ('all', 'armhf')
|
||||||
|
|
||||||
def __init__(self, britney, distribution, series, debug=False):
|
def __init__(self, britney, distribution, series, debug=False):
|
||||||
self.britney = britney
|
self.britney = britney
|
||||||
self.distribution = distribution
|
self.distribution = distribution
|
||||||
@ -107,12 +109,16 @@ class BootTest(object):
|
|||||||
"""
|
"""
|
||||||
# Discover all binaries for the 'excused' source.
|
# Discover all binaries for the 'excused' source.
|
||||||
unstable_sources = self.britney.sources['unstable']
|
unstable_sources = self.britney.sources['unstable']
|
||||||
|
# Dismiss if source is not yet recognized (??).
|
||||||
|
if excuse.name not in unstable_sources:
|
||||||
|
raise StopIteration
|
||||||
# XXX cprov 20150120: binaries are a seq of "<binname>/<arch>" and,
|
# XXX cprov 20150120: binaries are a seq of "<binname>/<arch>" and,
|
||||||
# practically, boottest is only concerned about armhf+all binaries.
|
# practically, boottest is only concerned about armhf+all binaries.
|
||||||
# Anything else should be skipped.
|
# Anything else should be skipped.
|
||||||
binary_names = [
|
binary_names = [
|
||||||
bin.split('/')[0]
|
b.split('/')[0]
|
||||||
for bin in unstable_sources[excuse.name][BINARIES]
|
for b in unstable_sources[excuse.name][BINARIES]
|
||||||
|
if b.split('/')[1] in self.ARCHITECTURES
|
||||||
]
|
]
|
||||||
|
|
||||||
# Process (request or update) boottest attempts for each binary.
|
# Process (request or update) boottest attempts for each binary.
|
||||||
|
19
britney.py
19
britney.py
@ -1897,18 +1897,27 @@ class Britney(object):
|
|||||||
# Skip already invalid excuses.
|
# Skip already invalid excuses.
|
||||||
if not excuse.is_valid:
|
if not excuse.is_valid:
|
||||||
continue
|
continue
|
||||||
|
# Also skip removals, binary-only candidates, proposed-updates
|
||||||
|
# and unknown versions.
|
||||||
|
if (e.name.startswith("-") or
|
||||||
|
"/" in e.name or
|
||||||
|
"_" in e.name or
|
||||||
|
e.ver[1] == "-"):
|
||||||
|
continue
|
||||||
statuses = set()
|
statuses = set()
|
||||||
# Update valid excuses from the boottest context and if they
|
# Update valid excuses from the boottest context.
|
||||||
# have failed, block their migration.
|
|
||||||
for binary_name, status in boottest.update(excuse):
|
for binary_name, status in boottest.update(excuse):
|
||||||
label = BootTest.EXCUSE_LABELS.get(
|
label = BootTest.EXCUSE_LABELS.get(
|
||||||
status, 'UNKNOWN STATUS')
|
status, 'UNKNOWN STATUS')
|
||||||
excuse.addhtml("boottest for %s %s: %s" %
|
excuse.addhtml("boottest for %s %s: %s" %
|
||||||
(binary_name, excuse.ver[1], label))
|
(binary_name, excuse.ver[1], label))
|
||||||
statuses.add(status)
|
statuses.add(status)
|
||||||
# If all boottests passed or were skipped, the excuse is
|
# No boottest attemps requested, it's not relevant in this
|
||||||
# clean and promotion can proceed, according to the
|
# context, rely on other checks to judge promotion.
|
||||||
# boottest criteria. Otherwise block the promotion.
|
if not statuses:
|
||||||
|
continue
|
||||||
|
# Block promotion if any boottests attempt has failed or
|
||||||
|
# still in progress.
|
||||||
if not statuses.issubset(set(BootTest.VALID_STATUSES)):
|
if not statuses.issubset(set(BootTest.VALID_STATUSES)):
|
||||||
excuse.addhtml("Not considered")
|
excuse.addhtml("Not considered")
|
||||||
excuse.addreason("boottest")
|
excuse.addreason("boottest")
|
||||||
|
@ -76,15 +76,18 @@ class TestBoottestEnd2End(TestBase):
|
|||||||
super(TestBoottestEnd2End, self).setUp()
|
super(TestBoottestEnd2End, self).setUp()
|
||||||
self.britney_conf = os.path.join(
|
self.britney_conf = os.path.join(
|
||||||
PROJECT_DIR, 'britney_boottest.conf')
|
PROJECT_DIR, 'britney_boottest.conf')
|
||||||
self.data.add('libc6', False)
|
self.data.add('libc6', False, {'Architecture': 'armhf'}),
|
||||||
|
|
||||||
self.data.add(
|
self.data.add(
|
||||||
'libgreen1',
|
'libgreen1',
|
||||||
False,
|
False,
|
||||||
{'Source': 'green', 'Depends': 'libc6 (>= 0.9)'})
|
{'Source': 'green', 'Architecture': 'armhf',
|
||||||
|
'Depends': 'libc6 (>= 0.9)'})
|
||||||
self.data.add(
|
self.data.add(
|
||||||
'green',
|
'green',
|
||||||
False,
|
False,
|
||||||
{'Source': 'green', 'Depends': 'libc6 (>= 0.9), libgreen1'})
|
{'Source': 'green', 'Architecture': 'armhf',
|
||||||
|
'Depends': 'libc6 (>= 0.9), libgreen1'})
|
||||||
self.create_manifest([
|
self.create_manifest([
|
||||||
'green 1.0',
|
'green 1.0',
|
||||||
'pyqt5:armhf 1.0',
|
'pyqt5:armhf 1.0',
|
||||||
@ -117,8 +120,9 @@ class TestBoottestEnd2End(TestBase):
|
|||||||
# 'in progress' tests blocks package promotion.
|
# 'in progress' tests blocks package promotion.
|
||||||
context = [
|
context = [
|
||||||
('green', {'Source': 'green', 'Version': '1.1~beta',
|
('green', {'Source': 'green', 'Version': '1.1~beta',
|
||||||
'Depends': 'libc6 (>= 0.9)'}),
|
'Architecture': 'armhf', 'Depends': 'libc6 (>= 0.9)'}),
|
||||||
('libgreen1', {'Source': 'green', 'Version': '1.1~beta',
|
('libgreen1', {'Source': 'green', 'Version': '1.1~beta',
|
||||||
|
'Architecture': 'armhf',
|
||||||
'Depends': 'libc6 (>= 0.9)'}),
|
'Depends': 'libc6 (>= 0.9)'}),
|
||||||
]
|
]
|
||||||
self.do_test(
|
self.do_test(
|
||||||
@ -136,7 +140,8 @@ class TestBoottestEnd2End(TestBase):
|
|||||||
# promotion.
|
# promotion.
|
||||||
context = []
|
context = []
|
||||||
context.append(
|
context.append(
|
||||||
('pyqt5', {'Source': 'pyqt5-src', 'Version': '1.1~beta'}))
|
('pyqt5', {'Source': 'pyqt5-src', 'Version': '1.1~beta',
|
||||||
|
'Architecture': 'all'}))
|
||||||
self.do_test(
|
self.do_test(
|
||||||
context,
|
context,
|
||||||
[r'\bpyqt5-src\b.*\(- to .*>1.1~beta<',
|
[r'\bpyqt5-src\b.*\(- to .*>1.1~beta<',
|
||||||
@ -150,7 +155,8 @@ class TestBoottestEnd2End(TestBase):
|
|||||||
# ('Not considered.')
|
# ('Not considered.')
|
||||||
context = []
|
context = []
|
||||||
context.append(
|
context.append(
|
||||||
('pyqt5', {'Source': 'pyqt5-src', 'Version': '1.1'}))
|
('pyqt5', {'Source': 'pyqt5-src', 'Version': '1.1',
|
||||||
|
'Architecture': 'all'}))
|
||||||
self.do_test(
|
self.do_test(
|
||||||
context,
|
context,
|
||||||
[r'\bpyqt5-src\b.*\(- to .*>1.1<',
|
[r'\bpyqt5-src\b.*\(- to .*>1.1<',
|
||||||
@ -158,13 +164,13 @@ class TestBoottestEnd2End(TestBase):
|
|||||||
BootTest.EXCUSE_LABELS['FAIL']),
|
BootTest.EXCUSE_LABELS['FAIL']),
|
||||||
'<li>Not considered'])
|
'<li>Not considered'])
|
||||||
|
|
||||||
def test_skipped(self):
|
def test_skipped_not_on_phone(self):
|
||||||
# `Britney` updates boottesting information in excuses when the
|
# `Britney` updates boottesting information in excuses when the
|
||||||
# package was skipped and marks the package as a valid candidate for
|
# package was skipped and marks the package as a valid candidate for
|
||||||
# promotion.
|
# promotion.
|
||||||
context = []
|
context = []
|
||||||
context.append(
|
context.append(
|
||||||
('apache2', {'Source': 'apache2-src',
|
('apache2', {'Source': 'apache2-src', 'Architecture': 'all',
|
||||||
'Version': '2.4.8-1ubuntu1'}))
|
'Version': '2.4.8-1ubuntu1'}))
|
||||||
self.do_test(
|
self.do_test(
|
||||||
context,
|
context,
|
||||||
@ -173,6 +179,22 @@ class TestBoottestEnd2End(TestBase):
|
|||||||
BootTest.EXCUSE_LABELS['SKIPPED']),
|
BootTest.EXCUSE_LABELS['SKIPPED']),
|
||||||
'<li>Valid candidate'])
|
'<li>Valid candidate'])
|
||||||
|
|
||||||
|
def test_skipped_architecture_not_allowed(self):
|
||||||
|
# `Britney` does not trigger boottests for source not yet built on
|
||||||
|
# the allowed architectures.
|
||||||
|
self.data.add(
|
||||||
|
'pyqt5', False, {'Source': 'pyqt5-src', 'Architecture': 'armhf'})
|
||||||
|
context = [
|
||||||
|
('pyqt5', {'Source': 'pyqt5-src', 'Version': '1.1',
|
||||||
|
'Architecture': 'amd64'}),
|
||||||
|
]
|
||||||
|
self.do_test(
|
||||||
|
context,
|
||||||
|
[r'\bpyqt5-src\b.*>1</a> to .*>1.1<',
|
||||||
|
r'<li>missing build on .*>armhf</a>: pyqt5 \(from .*>1</a>\)',
|
||||||
|
'<li>Not considered'])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user