summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest
diff options
context:
space:
mode:
authorOla x Nilsson <ola.x.nilsson@axis.com>2016-12-12 17:19:29 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-14 12:30:49 +0000
commitd65886bb696365698111cd33fad577d5d12ce576 (patch)
treed80302a0de855b7733f65c259396b2c0c613cbab /meta/lib/oeqa/selftest
parentc61b525e9190d1f6e18c3d7fc16736c075317b1d (diff)
downloadpoky-d65886bb696365698111cd33fad577d5d12ce576.tar.gz
oe-pkgdata-util: Make read-value handle override variables
Some variables in pkgdata files have a package-name override. When the bare variable can not be found, try with the override-variant. PKGSIZE is one such variable, and already had special code to handle this. Test included. (From OE-Core rev: 6df99cda894033cba68bc6ab91e47f67e0d788a5) Signed-off-by: Ola x Nilsson <ola.x.nilsson@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest')
-rw-r--r--meta/lib/oeqa/selftest/pkgdata.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/pkgdata.py b/meta/lib/oeqa/selftest/pkgdata.py
index 5a63f89ff2..adfe346879 100644
--- a/meta/lib/oeqa/selftest/pkgdata.py
+++ b/meta/lib/oeqa/selftest/pkgdata.py
@@ -41,6 +41,8 @@ class OePkgdataUtilTests(oeSelfTest):
41 def test_read_value(self): 41 def test_read_value(self):
42 result = runCmd('oe-pkgdata-util read-value PN libz1') 42 result = runCmd('oe-pkgdata-util read-value PN libz1')
43 self.assertEqual(result.output, 'zlib') 43 self.assertEqual(result.output, 'zlib')
44 result = runCmd('oe-pkgdata-util read-value PKG libz1')
45 self.assertEqual(result.output, 'libz1')
44 result = runCmd('oe-pkgdata-util read-value PKGSIZE bash') 46 result = runCmd('oe-pkgdata-util read-value PKGSIZE bash')
45 pkgsize = int(result.output.strip()) 47 pkgsize = int(result.output.strip())
46 self.assertGreater(pkgsize, 1, "Size should be greater than 1. %s" % result.output) 48 self.assertGreater(pkgsize, 1, "Size should be greater than 1. %s" % result.output)