diff --git a/autopkgtest.py b/autopkgtest.py index 990feb4..23d692d 100644 --- a/autopkgtest.py +++ b/autopkgtest.py @@ -162,6 +162,20 @@ class AutoPackageTest(object): tests = [] + # gcc-* triggers tons of tests via libgcc1, but this is mostly in vain: + # gcc already tests itself during build, and it is being used from + # -proposed, so holding it back on a dozen unrelated test failures + # serves no purpose. Just check some key packages which actually use + # gcc during the test, and libreoffice as an example for a libgcc user. + if src.startswith('gcc-'): + for test in ['binutils', 'fglrx-installer', 'libreoffice', 'linux']: + try: + tests.append((test, self.britney.sources['testing'][test][VERSION])) + except KeyError: + # no package in that series? *shrug*, then not (mostly for testing) + pass + return tests + srcinfo = sources_info[src] # we want to test the package itself, if it still has a test in # unstable diff --git a/tests/test_autopkgtest.py b/tests/test_autopkgtest.py index c761d4d..eb8d8d9 100755 --- a/tests/test_autopkgtest.py +++ b/tests/test_autopkgtest.py @@ -1137,6 +1137,19 @@ fancy 1 i386 linux-meta-lts-grumpy 1 [('linux-generic', {'Source': 'linux-meta'}, None)], {'linux-meta': (False, {'lxc 1': {'amd64': 'RUNNING', 'i386': 'RUNNING'}})}) + def test_gcc(self): + '''gcc only triggers some key packages''' + + self.data.add('binutils', False, {}, testsuite='autopkgtest') + self.data.add('linux', False, {}, testsuite='autopkgtest') + self.data.add('notme', False, {'Depends': 'libgcc1'}, testsuite='autopkgtest') + + exc = self.do_test( + [('libgcc1', {'Source': 'gcc-5', 'Version': '2'}, None)], + {'gcc-5': (False, {'binutils 1': {'amd64': 'RUNNING', 'i386': 'RUNNING'}, + 'linux 1': {'amd64': 'RUNNING', 'i386': 'RUNNING'}})})[1] + self.assertNotIn('notme 1', exc['gcc-5']['tests']['autopkgtest']) + def test_disable_adt(self): '''Run without autopkgtest requests'''