From c195f87ba5d8d3c286baa1cbb2fb9ef43ac2ebc5 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 28 Aug 2015 06:58:12 +0200 Subject: [PATCH] autopkgtest: Trigger lxc tests for linux updates New kernels are prone to break LXC. In https://bugs.debian.org/779559 there is a proposal for a flexible approach to add extra "reverse test dependencies". Hardcode this trigger until this gets implemented. --- autopkgtest.py | 5 +++++ tests/test_autopkgtest.py | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/autopkgtest.py b/autopkgtest.py index b385901..2d1ea98 100644 --- a/autopkgtest.py +++ b/autopkgtest.py @@ -207,6 +207,11 @@ class AutoPackageTest(object): tests.append((rdep_src, rdep_src_info[VERSION])) reported_pkgs.add(rdep_src) + # Hardcode linux → lxc trigger until we get a more flexible + # implementation: https://bugs.debian.org/779559 + if src == 'linux' and 'lxc' not in reported_pkgs: + tests.append(('lxc', self.britney.sources['testing']['lxc'][VERSION])) + tests.sort(key=lambda s_v: s_v[0]) return tests diff --git a/tests/test_autopkgtest.py b/tests/test_autopkgtest.py index d61d4a5..a8fe202 100755 --- a/tests/test_autopkgtest.py +++ b/tests/test_autopkgtest.py @@ -1129,6 +1129,16 @@ lightgreen 1 i386 green 3 'linux-meta-lts-grumpy': (False, {'fancy 1': {'amd64': 'RUNNING', 'i386': 'RUNNING'}}) }) + def test_kernel_triggers_lxc(self): + '''LXC test gets triggered by kernel uploads''' + + self.data.add('lxc', False, {'Testsuite-Triggers': 'linux-libc-dev'}, + testsuite='autopkgtest') + + self.do_test( + [('linux-libc-dev', {'Source': 'linux'}, None)], + {'linux': (False, {'lxc 1': {'amd64': 'RUNNING', 'i386': 'RUNNING'}})}) + def test_disable_adt(self): '''Run without autopkgtest requests'''