[oe-commits] [openembedded-core] 02/02: selftest/signing: Use packagedata to obtain PR value for signing test

git at git.openembedded.org git at git.openembedded.org
Thu Mar 31 22:55:40 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 322904f62f11e794543362f04212242567c556a0
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Thu Mar 31 23:54:34 2016 +0100

    selftest/signing: Use packagedata to obtain PR value for signing test
    
    Using PF to calculate the rpm filename doesn't work when PR server is
    enabled and an extra PR value can be injected. Add code to use packagedata
    to obtain the full name, allowing the test to work when PR server is
    in use.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oeqa/selftest/signing.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/signing.py b/meta/lib/oeqa/selftest/signing.py
index 312e502..d2b3f00 100644
--- a/meta/lib/oeqa/selftest/signing.py
+++ b/meta/lib/oeqa/selftest/signing.py
@@ -46,6 +46,7 @@ class Signing(oeSelfTest):
         Author:      Daniel Istrate <daniel.alexandrux.istrate at intel.com>
         AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate at intel.com>
         """
+        import oe.packagedata
 
         package_classes = get_bb_var('PACKAGE_CLASSES')
         if 'package_rpm' not in package_classes:
@@ -65,7 +66,12 @@ class Signing(oeSelfTest):
         bitbake(test_recipe)
         self.add_command_to_tearDown('bitbake -c clean %s' % test_recipe)
 
-        pf = get_bb_var('PF', test_recipe)
+        pkgdatadir = get_bb_var('PKGDATA_DIR', test_recipe)
+        pkgdata = oe.packagedata.read_pkgdatafile(pkgdatadir + "/runtime/ed")
+        if 'PKGE' in pkgdata:
+            pf = pkgdata['PN'] + "-" + pkgdata['PKGE'] + pkgdata['PKGV'] + '-' + pkgdata['PKGR']
+        else:
+            pf = pkgdata['PN'] + "-" + pkgdata['PKGV'] + '-' + pkgdata['PKGR']
         deploy_dir_rpm = get_bb_var('DEPLOY_DIR_RPM', test_recipe)
         package_arch = get_bb_var('PACKAGE_ARCH', test_recipe).replace('-', '_')
         staging_bindir_native = get_bb_var('STAGING_BINDIR_NATIVE')

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list