[OE-core] [OE-Core][PATCH] lib/oeqa/runtime: added rpm dependency test

Alexandru Palalau alexandrux.palalau at linux.intel.com
Mon Oct 21 12:18:55 UTC 2013


Ignore this one...will send V2

On 10/20/2013 8:17 PM, Alexandru Palalau wrote:
> From: Alexandru Palalau <alexandrux.palalau at intel.com>
>
> Signed-off-by: Alexandru Palalau <alexandrux.palalau at intel.com>
> ---
>   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')
>


-- 
Alexandru Palalau



More information about the Openembedded-core mailing list