summaryrefslogtreecommitdiff
path: root/meta/lib/oeqa/selftest/pkgdata.py
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2017-02-21 14:33:08 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-01 12:54:24 +0000
commite53f86ba8aeb6d2e9eb259329001d27d62401072 (patch)
treef5a8a59120e5ba4b94a8968da865240680d782b0 /meta/lib/oeqa/selftest/pkgdata.py
parent37fd073526811dee6edcfbb78a1864dd37991f4d (diff)
downloadopenembedded-core-e53f86ba8aeb6d2e9eb259329001d27d62401072.tar.gz
openembedded-core-e53f86ba8aeb6d2e9eb259329001d27d62401072.tar.bz2
openembedded-core-e53f86ba8aeb6d2e9eb259329001d27d62401072.zip
selftest: Optimize get_bb_var use
get_bb_var calls bitbake every time it is used and every call would take about 7 seconds. There are tests that calls get_bb_var several times when they can use get_bb_vars. Also there are tests that calls it to fetch the same variable over and over again. This will optimize the use of get_bb_var and get_bb_vars for a little speed up in the tests. [YOCTO #11037] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/lib/oeqa/selftest/pkgdata.py')
-rw-r--r--meta/lib/oeqa/selftest/pkgdata.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/meta/lib/oeqa/selftest/pkgdata.py b/meta/lib/oeqa/selftest/pkgdata.py
index 3512ce3531..36d8b346d0 100644
--- a/meta/lib/oeqa/selftest/pkgdata.py
+++ b/meta/lib/oeqa/selftest/pkgdata.py
@@ -6,7 +6,7 @@ import fnmatch
import oeqa.utils.ftools as ftools
from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
from oeqa.utils.decorators import testcase
class OePkgdataUtilTests(oeSelfTest):
@@ -126,10 +126,11 @@ class OePkgdataUtilTests(oeSelfTest):
curpkg = line.split(':')[0]
files[curpkg] = []
return files
- base_libdir = get_bb_var('base_libdir')
- libdir = get_bb_var('libdir')
- includedir = get_bb_var('includedir')
- mandir = get_bb_var('mandir')
+ bb_vars = get_bb_vars(['base_libdir', 'libdir', 'includedir', 'mandir'])
+ base_libdir = bb_vars['base_libdir']
+ libdir = bb_vars['libdir']
+ includedir = bb_vars['includedir']
+ mandir = bb_vars['mandir']
# Test recipe-space package name
result = runCmd('oe-pkgdata-util list-pkg-files zlib-dev zlib-doc')
files = splitoutput(result.output)