aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/eSDK.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/eSDK.py
parent37fd073526811dee6edcfbb78a1864dd37991f4d (diff)
downloadopenembedded-core-contrib-e53f86ba8aeb6d2e9eb259329001d27d62401072.tar.gz
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/eSDK.py')
-rw-r--r--meta/lib/oeqa/selftest/eSDK.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/meta/lib/oeqa/selftest/eSDK.py b/meta/lib/oeqa/selftest/eSDK.py
index b68e997ba9..a66ff92140 100644
--- a/meta/lib/oeqa/selftest/eSDK.py
+++ b/meta/lib/oeqa/selftest/eSDK.py
@@ -6,9 +6,9 @@ import glob
import logging
import subprocess
import oeqa.utils.ftools as ftools
-from oeqa.utils.decorators import testcase
+from oeqa.utils.decorators import testcase
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.httpserver import HTTPService
class oeSDKExtSelfTest(oeSelfTest):
@@ -24,7 +24,7 @@ class oeSDKExtSelfTest(oeSelfTest):
# what environment load oe-selftest, i586, x86_64
pattern = os.path.join(tmpdir_eSDKQA, 'environment-setup-*')
return glob.glob(pattern)[0]
-
+
@staticmethod
def run_esdk_cmd(env_eSDK, tmpdir_eSDKQA, cmd, postconfig=None, **options):
if postconfig:
@@ -47,10 +47,11 @@ class oeSDKExtSelfTest(oeSelfTest):
def get_eSDK_toolchain(image):
pn_task = '%s -c populate_sdk_ext' % image
- sdk_deploy = get_bb_var('SDK_DEPLOY', pn_task)
- toolchain_name = get_bb_var('TOOLCHAINEXT_OUTPUTNAME', pn_task)
+ bb_vars = get_bb_vars(['SDK_DEPLOY', 'TOOLCHAINEXT_OUTPUTNAME'], pn_task)
+ sdk_deploy = bb_vars['SDK_DEPLOY']
+ toolchain_name = bb_vars['TOOLCHAINEXT_OUTPUTNAME']
return os.path.join(sdk_deploy, toolchain_name + '.sh')
-
+
@staticmethod
def update_configuration(cls, image, tmpdir_eSDKQA, env_eSDK, ext_sdk_path):
sstate_dir = os.path.join(os.environ['BUILDDIR'], 'sstate-cache')
@@ -119,7 +120,7 @@ SSTATE_MIRRORS = "file://.* http://%s/PATH"
bitbake(pn_sstate)
cmd = "devtool sdk-install %s " % pn_sstate
oeSDKExtSelfTest.run_esdk_cmd(self.env_eSDK, self.tmpdir_eSDKQA, cmd)
-
+
@testcase(1603)
def test_image_generation_binary_feeds(self):
image = 'core-image-minimal'