summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-31 23:54:34 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-01 07:14:30 +0100
commitd110eba6624ebfaa115290feff8871af22e188f0 (patch)
treec924c79e9e8cd2c4764d8fc5c1ec2639e819b444 /meta/lib/oeqa/selftest
parent34f11b58ecbb52d25f131231c1df7f69d1c85c9c (diff)
downloadpoky-d110eba6624ebfaa115290feff8871af22e188f0.tar.gz
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. (From OE-Core rev: 322904f62f11e794543362f04212242567c556a0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest')
-rw-r--r--meta/lib/oeqa/selftest/signing.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/signing.py b/meta/lib/oeqa/selftest/signing.py
index 312e5026c3..d2b3f0003c 100644
--- a/meta/lib/oeqa/selftest/signing.py
+++ b/meta/lib/oeqa/selftest/signing.py
@@ -46,6 +46,7 @@ class Signing(oeSelfTest):
46 Author: Daniel Istrate <daniel.alexandrux.istrate@intel.com> 46 Author: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
47 AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com> 47 AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
48 """ 48 """
49 import oe.packagedata
49 50
50 package_classes = get_bb_var('PACKAGE_CLASSES') 51 package_classes = get_bb_var('PACKAGE_CLASSES')
51 if 'package_rpm' not in package_classes: 52 if 'package_rpm' not in package_classes:
@@ -65,7 +66,12 @@ class Signing(oeSelfTest):
65 bitbake(test_recipe) 66 bitbake(test_recipe)
66 self.add_command_to_tearDown('bitbake -c clean %s' % test_recipe) 67 self.add_command_to_tearDown('bitbake -c clean %s' % test_recipe)
67 68
68 pf = get_bb_var('PF', test_recipe) 69 pkgdatadir = get_bb_var('PKGDATA_DIR', test_recipe)
70 pkgdata = oe.packagedata.read_pkgdatafile(pkgdatadir + "/runtime/ed")
71 if 'PKGE' in pkgdata:
72 pf = pkgdata['PN'] + "-" + pkgdata['PKGE'] + pkgdata['PKGV'] + '-' + pkgdata['PKGR']
73 else:
74 pf = pkgdata['PN'] + "-" + pkgdata['PKGV'] + '-' + pkgdata['PKGR']
69 deploy_dir_rpm = get_bb_var('DEPLOY_DIR_RPM', test_recipe) 75 deploy_dir_rpm = get_bb_var('DEPLOY_DIR_RPM', test_recipe)
70 package_arch = get_bb_var('PACKAGE_ARCH', test_recipe).replace('-', '_') 76 package_arch = get_bb_var('PACKAGE_ARCH', test_recipe).replace('-', '_')
71 staging_bindir_native = get_bb_var('STAGING_BINDIR_NATIVE') 77 staging_bindir_native = get_bb_var('STAGING_BINDIR_NATIVE')