Drop dkms auto-detection for autodep8 as it isn't opt-in

Because autopkgtest failure in a package is now a serious bug (RC), packages
that don't opt-in should not be tested. Due to the way autopkgtest and autodep8
work together, package that don't declare they have an autopkgtest can still be
tested. However, maintainers should not be force to say their package doesn't
work with autodep8 by introducing a fake test.
ubuntu/rebased
Paul Gevers 5 years ago
parent d1081c9f59
commit b380508635
No known key found for this signature in database
GPG Key ID: 9C5C99EB05BD750A

@ -467,7 +467,7 @@ class AutopkgtestPolicy(BasePolicy):
#
@classmethod
def has_autodep8(kls, srcinfo, binaries):
def has_autodep8(kls, srcinfo):
'''Check if package is covered by autodep8
srcinfo is an item from self.britney.sources
@ -478,14 +478,6 @@ class AutopkgtestPolicy(BasePolicy):
if t.startswith('autopkgtest-pkg'):
return True
# DKMS: some binary depends on "dkms"
for pkg_id in srcinfo.binaries:
try:
bininfo = binaries[pkg_id.package_name]
except KeyError:
continue
if 'dkms' in (bininfo.depends or ''):
return True
return False
def request_tests_for_source(self, item, arch, source_data_srcdist, pkg_arch_result):
@ -638,7 +630,7 @@ class AutopkgtestPolicy(BasePolicy):
# we want to test the package itself, if it still has a test in unstable
srcinfo = source_suite.sources[src]
if 'autopkgtest' in srcinfo.testsuite or self.has_autodep8(srcinfo, binaries_info):
if 'autopkgtest' in srcinfo.testsuite or self.has_autodep8(srcinfo):
reported_pkgs.add(src)
tests.append((src, ver))
@ -673,7 +665,7 @@ class AutopkgtestPolicy(BasePolicy):
continue
rdep_src_info = sources_info[rdep_src]
if 'autopkgtest' in rdep_src_info.testsuite or self.has_autodep8(rdep_src_info, binaries_info):
if 'autopkgtest' in rdep_src_info.testsuite or self.has_autodep8(rdep_src_info):
if rdep_src not in reported_pkgs:
tests.append((rdep_src, rdep_src_info.version))
reported_pkgs.add(rdep_src)
@ -684,7 +676,7 @@ class AutopkgtestPolicy(BasePolicy):
tdep_src_info = sources_info[tdep_src]
except KeyError:
continue
if 'autopkgtest' in tdep_src_info.testsuite or self.has_autodep8(tdep_src_info, binaries_info):
if 'autopkgtest' in tdep_src_info.testsuite or self.has_autodep8(tdep_src_info):
for pkg_id in tdep_src_info.binaries:
if pkg_id.architecture == arch:
tests.append((tdep_src, tdep_src_info.version))

@ -1951,7 +1951,7 @@ class T(TestBase):
'''DKMS packages are autopkgtested (via autodep8)'''
self.data.add('dkms', False, {})
self.data.add('fancy-dkms', False, {'Source': 'fancy', 'Depends': 'dkms (>= 1)'})
self.data.add('fancy-dkms', False, {'Source': 'fancy', 'Depends': 'dkms (>= 1)'}, testsuite='autopkgtest-pkg-dkms')
self.swift.set_results({'autopkgtest-testing': {
'testing/i386/f/fancy/20150101_100101@': (0, 'fancy 0.1', tr('passedbefore/1'))
@ -1966,7 +1966,7 @@ class T(TestBase):
'''DKMS packages get triggered by kernel uploads'''
self.data.add('dkms', False, {})
self.data.add('fancy-dkms', False, {'Source': 'fancy', 'Depends': 'dkms (>= 1)'})
self.data.add('fancy-dkms', False, {'Source': 'fancy', 'Depends': 'dkms (>= 1)'}, testsuite='autopkgtest-pkg-dkms')
self.run_it(
[('linux-image-generic', {'Source': 'linux-meta'}, None),
@ -1997,7 +1997,7 @@ class T(TestBase):
'''DKMS results get mapped to the triggering kernel version'''
self.data.add('dkms', False, {})
self.data.add('fancy-dkms', False, {'Source': 'fancy', 'Depends': 'dkms (>= 1)'})
self.data.add('fancy-dkms', False, {'Source': 'fancy', 'Depends': 'dkms (>= 1)'}, testsuite='autopkgtest-pkg-dkms')
# works against linux-meta and -64only, fails against grumpy i386, no
# result yet for grumpy amd64
@ -2026,7 +2026,7 @@ class T(TestBase):
'''DKMS results get mapped to the triggering kernel version, old results'''
self.data.add('dkms', False, {})
self.data.add('fancy-dkms', False, {'Source': 'fancy', 'Depends': 'dkms (>= 1)'})
self.data.add('fancy-dkms', False, {'Source': 'fancy', 'Depends': 'dkms (>= 1)'}, testsuite='autopkgtest-pkg-dkms')
# works against linux-meta and -64only, fails against grumpy i386, no
# result yet for grumpy amd64

Loading…
Cancel
Save