Stop triggering tests by linux, move to -meta

For linux* themselves we don't want to trigger tests -- these should all come
from linux-meta*. A new kernel ABI without a corresponding -meta won't be
installed and thus we can't sensibly run tests against it. This caused
unnecessary and wrong regressions, and unnecessary runs (like linux-goldfish
being triggered by linux).
bzr-import-20160707
Martin Pitt 9 years ago
parent ee7859ea0e
commit 445e33e9e0

@ -176,6 +176,13 @@ class AutoPackageTest(object):
# to trigger anything # to trigger anything
return [] return []
# for linux themselves we don't want to trigger tests -- these should
# all come from linux-meta*. A new kernel ABI without a corresponding
# -meta won't be installed and thus we can't sensibly run tests against
# it.
if src.startswith('linux') and src.replace('linux', 'linux-meta') in self.britney.sources['testing']:
return []
srcinfo = sources_info[src] srcinfo = sources_info[src]
# we want to test the package itself, if it still has a test in # we want to test the package itself, if it still has a test in
# unstable # unstable
@ -225,17 +232,22 @@ class AutoPackageTest(object):
tests.append((rdep_src, rdep_src_info[VERSION])) tests.append((rdep_src, rdep_src_info[VERSION]))
reported_pkgs.add(rdep_src) reported_pkgs.add(rdep_src)
# Hardcode linux → lxc trigger until we get a more flexible # Hardcode linux-meta linux, lxc, glibc triggers until we get a more flexible
# implementation: https://bugs.debian.org/779559 # implementation: https://bugs.debian.org/779559
if src.startswith('linux-meta') and 'lxc' not in reported_pkgs: if src.startswith('linux-meta'):
for pkg in ['lxc', 'glibc', src.replace('linux-meta', 'linux')]:
if pkg not in reported_pkgs:
# does this have any image on this arch? # does this have any image on this arch?
for b in srcinfo[BINARIES]: for b in srcinfo[BINARIES]:
p, a = b.split('/', 1) p, a = b.split('/', 1)
if a == arch and '-image' in p: if a == arch and '-image' in p:
try: try:
tests.append(('lxc', self.britney.sources['testing']['lxc'][VERSION])) tests.append((pkg, self.britney.sources['unstable'][pkg][VERSION]))
except KeyError:
try:
tests.append((pkg, self.britney.sources['testing'][pkg][VERSION]))
except KeyError: except KeyError:
# no lxc package in that series? *shrug*, then not # package not in that series? *shrug*, then not
pass pass
break break

@ -1428,25 +1428,34 @@ fancy 1 i386 linux-meta-lts-grumpy 1
self.assertEqual(self.pending_requests, '') self.assertEqual(self.pending_requests, '')
def test_kernel_triggers_lxc(self): def test_kernel_triggerered_tests(self):
'''LXC test gets triggered by kernel uploads''' '''linux, lxc, glibc tests get triggered by linux-meta* uploads'''
self.data.remove_all(False)
self.data.add('libc6-dev', False, {'Source': 'glibc', 'Depends': 'linux-libc-dev'},
testsuite='autopkgtest')
self.data.add('lxc', False, {'Testsuite-Triggers': 'linux-generic'}, self.data.add('lxc', False, {'Testsuite-Triggers': 'linux-generic'},
testsuite='autopkgtest') testsuite='autopkgtest')
self.data.add('linux-image-1', False, {'Source': 'linux'}, testsuite='autopkgtest')
self.data.add('linux-libc-dev', False, {'Source': 'linux'}, testsuite='autopkgtest')
self.data.add('linux-image', False, {'Source': 'linux-meta', 'Depends': 'linux-image-1'})
self.do_test( exc = self.do_test(
[('linux-image', {'Source': 'linux-meta'}, None), [('linux-image', {'Version': '2', 'Depends': 'linux-image-2', 'Source': 'linux-meta'}, None),
('linux-image-64only', {'Source': 'linux-meta-64only', 'Architecture': 'amd64'}, None), ('linux-image-64only', {'Source': 'linux-meta-64only', 'Architecture': 'amd64'}, None),
('linux-image-2', {'Version': '2', 'Source': 'linux'}, 'autopkgtest'),
('linux-libc-dev', {'Version': '2', 'Source': 'linux'}, 'autopkgtest'),
], ],
{'linux-meta': (False, {'lxc 1': {'amd64': 'RUNNING', 'i386': 'RUNNING'}}), {'linux-meta': (False, {'lxc 1': {'amd64': 'RUNNING', 'i386': 'RUNNING'},
'linux-meta-64only': (False, {'lxc 1': {'amd64': 'RUNNING'}}) 'glibc 1': {'amd64': 'RUNNING', 'i386': 'RUNNING'},
}) 'linux 2': {'amd64': 'RUNNING', 'i386': 'RUNNING'},
}),
self.assertEqual( 'linux-meta-64only': (False, {'lxc 1': {'amd64': 'RUNNING'}}),
self.amqp_requests, 'linux': (False, {}),
set(['debci-series-i386:lxc {"triggers": ["linux-meta/1"]}', })[1]
'debci-series-amd64:lxc {"triggers": ["linux-meta/1"]}', # the kernel itself should not trigger tests; we want to trigger
'debci-series-amd64:lxc {"triggers": ["linux-meta-64only/1"]}'])) # everything from -meta
self.assertNotIn('autopkgtest', exc['linux']['tests'])
def test_kernel_waits_on_meta(self): def test_kernel_waits_on_meta(self):
'''linux waits on linux-meta''' '''linux waits on linux-meta'''
@ -1458,8 +1467,8 @@ fancy 1 i386 linux-meta-lts-grumpy 1
self.data.add('linux-firmware', False, {'Source': 'linux-firmware'}, testsuite='autopkgtest') self.data.add('linux-firmware', False, {'Source': 'linux-firmware'}, testsuite='autopkgtest')
self.swift.set_results({'autopkgtest-series': { self.swift.set_results({'autopkgtest-series': {
'series/i386/l/linux/20150101_100000@': (0, 'linux 2', {'custom_environment': ['ADT_TEST_TRIGGERS=linux/2']}), 'series/i386/l/linux/20150101_100000@': (0, 'linux 2', {'custom_environment': ['ADT_TEST_TRIGGERS=linux-meta/0.2']}),
'series/amd64/l/linux/20150101_100000@': (0, 'linux 2', {'custom_environment': ['ADT_TEST_TRIGGERS=linux/2']}), 'series/amd64/l/linux/20150101_100000@': (0, 'linux 2', {'custom_environment': ['ADT_TEST_TRIGGERS=linux-meta/0.2']}),
'series/i386/l/linux-firmware/20150101_100000@': (0, 'linux-firmware 2', {'custom_environment': ['ADT_TEST_TRIGGERS=linux-firmware/2']}), 'series/i386/l/linux-firmware/20150101_100000@': (0, 'linux-firmware 2', {'custom_environment': ['ADT_TEST_TRIGGERS=linux-firmware/2']}),
'series/amd64/l/linux-firmware/20150101_100000@': (0, 'linux-firmware 2', {'custom_environment': ['ADT_TEST_TRIGGERS=linux-firmware/2']}), 'series/amd64/l/linux-firmware/20150101_100000@': (0, 'linux-firmware 2', {'custom_environment': ['ADT_TEST_TRIGGERS=linux-firmware/2']}),
}}) }})
@ -1469,9 +1478,11 @@ fancy 1 i386 linux-meta-lts-grumpy 1
('linux-image-2', {'Version': '2', 'Source': 'linux'}, 'autopkgtest'), ('linux-image-2', {'Version': '2', 'Source': 'linux'}, 'autopkgtest'),
('linux-firmware', {'Version': '2', 'Source': 'linux-firmware'}, 'autopkgtest'), ('linux-firmware', {'Version': '2', 'Source': 'linux-firmware'}, 'autopkgtest'),
], ],
{'linux-meta': (False, {'fancy 1': {'amd64': 'RUNNING', 'i386': 'RUNNING'}}), {'linux-meta': (False, {'fancy 1': {'amd64': 'RUNNING', 'i386': 'RUNNING'},
# tests pass, but should wait on linux-meta 'linux 2': {'amd64': 'PASS', 'i386': 'PASS'}
'linux': (False, {'linux 2': {'amd64': 'PASS', 'i386': 'PASS'}}), }),
# no tests, but should wait on linux-meta
'linux': (False, {}),
# this one does not have a -meta, so don't wait # this one does not have a -meta, so don't wait
'linux-firmware': (True, {'linux-firmware 2': {'amd64': 'PASS', 'i386': 'PASS'}}), 'linux-firmware': (True, {'linux-firmware 2': {'amd64': 'PASS', 'i386': 'PASS'}}),
}, },
@ -1487,8 +1498,9 @@ fancy 1 i386 linux-meta-lts-grumpy 1
}}) }})
self.do_test( self.do_test(
[], [],
{'linux-meta': (True, {'fancy 1': {'amd64': 'PASS', 'i386': 'PASS'}}), {'linux-meta': (True, {'fancy 1': {'amd64': 'PASS', 'i386': 'PASS'},
'linux': (True, {'linux 2': {'amd64': 'PASS', 'i386': 'PASS'}}), 'linux 2': {'amd64': 'PASS', 'i386': 'PASS'}}),
'linux': (True, {}),
'linux-firmware': (True, {'linux-firmware 2': {'amd64': 'PASS', 'i386': 'PASS'}}), 'linux-firmware': (True, {'linux-firmware 2': {'amd64': 'PASS', 'i386': 'PASS'}}),
}, },
{'linux': [('excuses', 'Depends: linux linux-meta')] {'linux': [('excuses', 'Depends: linux linux-meta')]

Loading…
Cancel
Save