Patchwork oeqa/runtime: rpm: fix finding the test rpm file

mail settings
Submitter Stanacar, StefanX
Date Jan. 28, 2014, 4:14 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/65967/
State Accepted
Commit fd0e9ad4d295ca11b33c3e3e11069421dee834e8
Headers show


Stanacar, StefanX - Jan. 28, 2014, 4:14 p.m.
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)

Signed-off-by: Stefan Stanacar <>
 meta/lib/oeqa/runtime/ | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)


diff --git a/meta/lib/oeqa/runtime/ b/meta/lib/oeqa/runtime/
index 154cad5..084d22f 100644
--- a/meta/lib/oeqa/runtime/
+++ b/meta/lib/oeqa/runtime/
@@ -1,8 +1,8 @@ 
 import unittest
 import os
+import fnmatch
 from oeqa.oetest import oeRuntimeTest, skipModule
 from oeqa.utils.decorators import *
-import oe.packagedata
 def setUpModule():
     if not oeRuntimeTest.hasFeature("package-management"):
@@ -27,11 +27,12 @@  class RpmInstallRemoveTest(oeRuntimeTest):
     def setUpClass(self):
-        deploydir = os.path.join('DEPLOY_DIR', True), "rpm",'TUNE_PKGARCH', True))
-        pkgdata = oe.packagedata.read_subpkgdata("rpm-doc",
+        pkgarch ='TUNE_PKGARCH', True).replace("-", "_")
+        rpmdir = os.path.join('DEPLOY_DIR', True), "rpm", pkgarch)
         # pick rpm-doc as a test file to get installed, because it's small and it will always be built for standard targets
-        testrpmfile = "rpm-doc-%s-%s.%s.rpm" % (pkgdata["PKGV"], pkgdata["PKGR"],'TUNE_PKGARCH', True))
-,testrpmfile), "/tmp/rpm-doc.rpm")
+        for f in fnmatch.filter(os.listdir(rpmdir), "rpm-doc-*.%s.rpm" % pkgarch):
+            testrpmfile = f
+,testrpmfile), "/tmp/rpm-doc.rpm")
     def test_rpm_install(self):