From: Alexandru Palalau <[email protected]>

Signed-off-by: Alexandru Palalau <[email protected]>
---
 meta/lib/oeqa/runtime/rpm.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/meta/lib/oeqa/runtime/rpm.py b/meta/lib/oeqa/runtime/rpm.py
index 154cad5..7b48e4c 100644
--- a/meta/lib/oeqa/runtime/rpm.py
+++ b/meta/lib/oeqa/runtime/rpm.py
@@ -29,15 +29,25 @@ class RpmInstallRemoveTest(oeRuntimeTest):
     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)
+        pkgdata2 = oe.packagedata.read_subpkgdata("psplash-default", 
oeRuntimeTest.tc.d)
         # 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))
+        testpsplashfile = "psplash-default-%s-%s.%s.rpm" % (pkgdata2["PKGV"], 
pkgdata2["PKGR"], oeRuntimeTest.tc.d.getVar('TUNE_PKGARCH', True))
         oeRuntimeTest.tc.target.copy_to(os.path.join(deploydir,testrpmfile), 
"/tmp/rpm-doc.rpm")
+        
oeRuntimeTest.tc.target.copy_to(os.path.join(deploydir,testpsplashfile), 
"/tmp/psplash-default.rpm")
 
     @skipUnlessPassed('test_rpm_help')
     def test_rpm_install(self):
         (status, output) = self.target.run('rpm -ivh /tmp/rpm-doc.rpm')
         self.assertEqual(status, 0, msg="Failed to install rpm-doc package: 
%s" % output)
 
+    @skipUnlessPassed('test_rpm_help')
+    def test_rpm_install_dependency(self):
+        (status, output) = self.target.run('rpm -e psplash psplash-default')
+        self.assertEqual(status, 0, msg="Failed to remove psplash and 
psplash-default packages. Output: %s" % output)
+        (status, output) = self.target.run('rpm -ivh /tmp/psplash-default.rpm')
+        self.assertEqual(status, 1, msg="Fail in using rpm install dependency 
command. Output: %s" % output)
+
     @skipUnlessPassed('test_rpm_install')
     def test_rpm_remove(self):
         (status,output) = self.target.run('rpm -e rpm-doc')
-- 
1.8.1.4

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to