diff --git a/autopkgtest.py b/autopkgtest.py index 4680752..867e1e6 100644 --- a/autopkgtest.py +++ b/autopkgtest.py @@ -169,9 +169,16 @@ class AutoPackageTest(object): reported_pkgs.add(src) tests.append((src, ver)) + extra_bins = [] + # Hack: For new kernels trigger all DKMS packages by pretending that + # linux-meta builds a "dkms" binary as well. With that we ensure that we + # don't regress DKMS drivers with new kernel versions. + if src == 'linux-meta': + extra_bins.append('dkms') + # plus all direct reverse dependencies of its binaries which have # an autopkgtest - for binary in srcinfo[BINARIES]: + for binary in srcinfo[BINARIES] + extra_bins: binary = binary.split('/')[0] # chop off arch try: rdeps = binaries_info[binary][RDEPENDS] diff --git a/tests/test_autopkgtest.py b/tests/test_autopkgtest.py index ed96c51..b1a9bbb 100755 --- a/tests/test_autopkgtest.py +++ b/tests/test_autopkgtest.py @@ -1104,7 +1104,7 @@ lightgreen 1 i386 green 3 {'lightgreen': [('old-version', '1'), ('new-version', '2')]} ) - def test_dkms(self): + def test_detect_dkms_autodep8(self): '''DKMS packages are autopkgtested (via autodep8)''' self.data.add('dkms', False, {}) @@ -1115,6 +1115,16 @@ lightgreen 1 i386 green 3 {'dkms': (False, {'fancy 1': {'amd64': 'RUNNING', 'i386': 'RUNNING'}})}, {'dkms': [('old-version', '1'), ('new-version', '2')]}) + def test_kernel_triggers_dkms(self): + '''DKMS packages get triggered by kernel uploads''' + + self.data.add('dkms', False, {}) + self.data.add('fancy-dkms', False, {'Source': 'fancy', 'Depends': 'dkms (>= 1)'}) + + self.do_test( + [('linux-image-generic', {'Source': 'linux-meta'}, None)], + {'linux-meta': (False, {'fancy 1': {'amd64': 'RUNNING', 'i386': 'RUNNING'}})}) + def test_disable_adt(self): '''Run without autopkgtest requests'''