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

login
register
mail settings
Submitter Stanacar, StefanX
Date Sept. 11, 2013, 6:40 p.m.
Message ID <1378924821-22760-1-git-send-email-stefanx.stanacar@intel.com>
Download mbox | patch
Permalink /patch/57841/
State Accepted
Commit 01135ee6f2efe08648df020951fb06db49177537
Headers show

Comments

Stanacar, StefanX - Sept. 11, 2013, 6:40 p.m.
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.

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
---
 meta/lib/oeqa/runtime/smart.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/lib/oeqa/runtime/smart.py b/meta/lib/oeqa/runtime/smart.py
index 468e047..e2f0aea 100644
--- a/meta/lib/oeqa/runtime/smart.py
+++ b/meta/lib/oeqa/runtime/smart.py
@@ -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):