mirror of
				https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
				synced 2025-11-04 10:34:05 +00:00 
			
		
		
		
	Autopkgtest: Trigger LXC from linux only on valid architectures
If the linux source package does not build any binaries on the given architecture, don't trigger an LXC test for it.
This commit is contained in:
		
							parent
							
								
									effdc25263
								
							
						
					
					
						commit
						2ba7fd223c
					
				@ -222,11 +222,16 @@ class AutoPackageTest(object):
 | 
			
		||||
        # Hardcode linux → lxc trigger until we get a more flexible
 | 
			
		||||
        # implementation: https://bugs.debian.org/779559
 | 
			
		||||
        if src.startswith('linux-meta') and 'lxc' not in reported_pkgs:
 | 
			
		||||
            try:
 | 
			
		||||
                tests.append(('lxc', self.britney.sources['testing']['lxc'][VERSION]))
 | 
			
		||||
            except KeyError:
 | 
			
		||||
                # no lxc package in that series? *shrug*, then not
 | 
			
		||||
                pass
 | 
			
		||||
            # does this have any image on this arch?
 | 
			
		||||
            for b in srcinfo[BINARIES]:
 | 
			
		||||
                p, a = b.split('/', 1)
 | 
			
		||||
                if a == arch and '-image' in p:
 | 
			
		||||
                    try:
 | 
			
		||||
                        tests.append(('lxc', self.britney.sources['testing']['lxc'][VERSION]))
 | 
			
		||||
                    except KeyError:
 | 
			
		||||
                        # no lxc package in that series? *shrug*, then not
 | 
			
		||||
                        pass
 | 
			
		||||
                    break
 | 
			
		||||
 | 
			
		||||
        tests.sort(key=lambda s_v: s_v[0])
 | 
			
		||||
        return tests
 | 
			
		||||
 | 
			
		||||
@ -1310,8 +1310,19 @@ fancy 1 i386 linux-meta-lts-grumpy 1
 | 
			
		||||
                      testsuite='autopkgtest')
 | 
			
		||||
 | 
			
		||||
        self.do_test(
 | 
			
		||||
            [('linux-generic', {'Source': 'linux-meta'}, None)],
 | 
			
		||||
            {'linux-meta': (False, {'lxc 1': {'amd64': 'RUNNING', 'i386': 'RUNNING'}})})
 | 
			
		||||
            [('linux-image', {'Source': 'linux-meta'}, None),
 | 
			
		||||
             ('linux-image-64only', {'Source': 'linux-meta-64only', 'Architecture': 'amd64'}, None),
 | 
			
		||||
            ],
 | 
			
		||||
            {'linux-meta': (False, {'lxc 1': {'amd64': 'RUNNING', 'i386': 'RUNNING'}}),
 | 
			
		||||
             'linux-meta-64only': (False, {'lxc 1': {'amd64': 'RUNNING'}})
 | 
			
		||||
            })
 | 
			
		||||
 | 
			
		||||
        self.assertEqual(
 | 
			
		||||
            self.amqp_requests,
 | 
			
		||||
            set(['debci-series-i386:lxc {"triggers": ["linux-meta/1"]}',
 | 
			
		||||
                 'debci-series-amd64:lxc {"triggers": ["linux-meta/1"]}',
 | 
			
		||||
                 'debci-series-amd64:lxc {"triggers": ["linux-meta-64only/1"]}']))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    def test_gcc(self):
 | 
			
		||||
        '''gcc only triggers some key packages'''
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user