summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorStefan Stanacar <stefanx.stanacar@intel.com>2014-01-28 18:14:18 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-28 18:01:47 +0000
commit82893ffced1f95981ad9bdeec31251ff6ec96529 (patch)
tree3506ca692e9d2eaa39cb061a01fc54afc91fed6d /meta/lib
parentbfa46b687231a8e71775a6f5391d269e3c0711aa (diff)
downloadpoky-82893ffced1f95981ad9bdeec31251ff6ec96529.tar.gz
oeqa/runtime: rpm: fix finding the test rpm file
Translate TUNE_PKGARCH to find the right file (this used to work because tune for qemux86-64 used to be x86_64 now it's core2-64) Also, while using packagedata was nice, it's harder to make the test exportable and runnable outside of the build system. (where oe.packagedata isn't available) (From OE-Core rev: fd0e9ad4d295ca11b33c3e3e11069421dee834e8) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/runtime/rpm.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/meta/lib/oeqa/runtime/rpm.py b/meta/lib/oeqa/runtime/rpm.py
index 154cad5014..084d22f96b 100644
--- a/meta/lib/oeqa/runtime/rpm.py
+++ b/meta/lib/oeqa/runtime/rpm.py
@@ -1,8 +1,8 @@
1import unittest 1import unittest
2import os 2import os
3import fnmatch
3from oeqa.oetest import oeRuntimeTest, skipModule 4from oeqa.oetest import oeRuntimeTest, skipModule
4from oeqa.utils.decorators import * 5from oeqa.utils.decorators import *
5import oe.packagedata
6 6
7def setUpModule(): 7def setUpModule():
8 if not oeRuntimeTest.hasFeature("package-management"): 8 if not oeRuntimeTest.hasFeature("package-management"):
@@ -27,11 +27,12 @@ class RpmInstallRemoveTest(oeRuntimeTest):
27 27
28 @classmethod 28 @classmethod
29 def setUpClass(self): 29 def setUpClass(self):
30 deploydir = os.path.join(oeRuntimeTest.tc.d.getVar('DEPLOY_DIR', True), "rpm", oeRuntimeTest.tc.d.getVar('TUNE_PKGARCH', True)) 30 pkgarch = oeRuntimeTest.tc.d.getVar('TUNE_PKGARCH', True).replace("-", "_")
31 pkgdata = oe.packagedata.read_subpkgdata("rpm-doc", oeRuntimeTest.tc.d) 31 rpmdir = os.path.join(oeRuntimeTest.tc.d.getVar('DEPLOY_DIR', True), "rpm", pkgarch)
32 # pick rpm-doc as a test file to get installed, because it's small and it will always be built for standard targets 32 # pick rpm-doc as a test file to get installed, because it's small and it will always be built for standard targets
33 testrpmfile = "rpm-doc-%s-%s.%s.rpm" % (pkgdata["PKGV"], pkgdata["PKGR"], oeRuntimeTest.tc.d.getVar('TUNE_PKGARCH', True)) 33 for f in fnmatch.filter(os.listdir(rpmdir), "rpm-doc-*.%s.rpm" % pkgarch):
34 oeRuntimeTest.tc.target.copy_to(os.path.join(deploydir,testrpmfile), "/tmp/rpm-doc.rpm") 34 testrpmfile = f
35 oeRuntimeTest.tc.target.copy_to(os.path.join(rpmdir,testrpmfile), "/tmp/rpm-doc.rpm")
35 36
36 @skipUnlessPassed('test_rpm_help') 37 @skipUnlessPassed('test_rpm_help')
37 def test_rpm_install(self): 38 def test_rpm_install(self):