summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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):