mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-03-12 03:41:08 +00:00
Autopkgtest: Don't trigger tests for alternative gcc-*
Sources like gcc-snapshot or gcc-4.7 are not the default compiler any more and thus triggering kernels etc. is just a waste.
This commit is contained in:
parent
1ab16725df
commit
ee7859ea0e
@ -22,6 +22,7 @@ import json
|
||||
import tarfile
|
||||
import io
|
||||
import copy
|
||||
import re
|
||||
from urllib.parse import urlencode
|
||||
from urllib.request import urlopen
|
||||
|
||||
@ -156,19 +157,24 @@ class AutoPackageTest(object):
|
||||
pass
|
||||
return tests
|
||||
|
||||
# gcc-* triggers tons of tests via libgcc1, but this is mostly in vain:
|
||||
# gcc-N 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
|
||||
if re.match('gcc-\d$', src):
|
||||
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
|
||||
else:
|
||||
# for other compilers such as gcc-snapshot etc. we don't need
|
||||
# to trigger anything
|
||||
return []
|
||||
|
||||
srcinfo = sources_info[src]
|
||||
# we want to test the package itself, if it still has a test in
|
||||
|
@ -1513,6 +1513,17 @@ fancy 1 i386 linux-meta-lts-grumpy 1
|
||||
'linux 1': {'amd64': 'RUNNING', 'i386': 'RUNNING'}})})[1]
|
||||
self.assertNotIn('notme 1', exc['gcc-5']['tests']['autopkgtest'])
|
||||
|
||||
def test_alternative_gcc(self):
|
||||
'''alternative gcc does not trigger anything'''
|
||||
|
||||
self.data.add('binutils', False, {}, testsuite='autopkgtest')
|
||||
self.data.add('notme', False, {'Depends': 'libgcc1'}, testsuite='autopkgtest')
|
||||
|
||||
exc = self.do_test(
|
||||
[('libgcc1', {'Source': 'gcc-snapshot', 'Version': '2'}, None)],
|
||||
{'gcc-snapshot': (True, {})})[1]
|
||||
self.assertNotIn('autopkgtest', exc['gcc-snapshot']['tests'])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
Loading…
x
Reference in New Issue
Block a user