diff options
author | Stefan Stanacar <stefanx.stanacar@intel.com> | 2014-01-28 18:14:18 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-01-28 17:56:00 +0000 |
commit | fd0e9ad4d295ca11b33c3e3e11069421dee834e8 (patch) | |
tree | d73a85ed1d7f28e25a20a2d3c36a1aed6f2fc228 /meta/lib/oeqa/runtime | |
parent | aa1224e4d83a4273848ba7601162157f5e415e30 (diff) | |
download | openembedded-core-fd0e9ad4d295ca11b33c3e3e11069421dee834e8.tar.gz openembedded-core-fd0e9ad4d295ca11b33c3e3e11069421dee834e8.tar.bz2 openembedded-core-fd0e9ad4d295ca11b33c3e3e11069421dee834e8.zip |
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)
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime')
-rw-r--r-- | meta/lib/oeqa/runtime/rpm.py | 11 |
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 @@ 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): @classmethod def setUpClass(self): - deploydir = os.path.join(oeRuntimeTest.tc.d.getVar('DEPLOY_DIR', True), "rpm", oeRuntimeTest.tc.d.getVar('TUNE_PKGARCH', True)) - pkgdata = oe.packagedata.read_subpkgdata("rpm-doc", oeRuntimeTest.tc.d) + pkgarch = oeRuntimeTest.tc.d.getVar('TUNE_PKGARCH', True).replace("-", "_") + rpmdir = os.path.join(oeRuntimeTest.tc.d.getVar('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"], oeRuntimeTest.tc.d.getVar('TUNE_PKGARCH', True)) - oeRuntimeTest.tc.target.copy_to(os.path.join(deploydir,testrpmfile), "/tmp/rpm-doc.rpm") + for f in fnmatch.filter(os.listdir(rpmdir), "rpm-doc-*.%s.rpm" % pkgarch): + testrpmfile = f + oeRuntimeTest.tc.target.copy_to(os.path.join(rpmdir,testrpmfile), "/tmp/rpm-doc.rpm") @skipUnlessPassed('test_rpm_help') def test_rpm_install(self): |