lib/oeqa/runtime: smart: limit channel add to useful ones

Don't add inappropiate channels on the target.
This happens when building two different machines in the
same dir and then running the tests for each machine.

(From OE-Core rev: 9e4e475b598f6b9bd2b653c72a1c1d5bd5c0b8c9)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Stefan Stanacar 2013-09-11 21:40:21 +03:00 committed by Richard Purdie
parent 83b90e54be
commit 01135ee6f2
1 changed files with 3 additions and 1 deletions

View File

@ -59,8 +59,10 @@ class SmartRepoTest(SmartTest):
def test_smart_channel_add(self):
image_pkgtype = self.tc.d.getVar('IMAGE_PKGTYPE', True)
deploy_url = 'http://%s:%s/%s' %(self.tc.qemu.host_ip, self.repo_server.port, image_pkgtype)
pkgarchs = self.tc.d.getVar('PACKAGE_ARCHS', True)
for arch in os.listdir('%s/%s' % (self.repo_server.root_dir, image_pkgtype)):
self.smart('channel -y --add {a} type=rpm-md baseurl={u}/{a}'.format(a=arch, u=deploy_url))
if arch in pkgarchs:
self.smart('channel -y --add {a} type=rpm-md baseurl={u}/{a}'.format(a=arch, u=deploy_url))
self.smart('update')
def test_smart_channel_help(self):