diff options
-rw-r--r-- | meta/lib/oeqa/selftest/archiver.py | 7 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/buildhistory.py | 5 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/eSDK.py | 21 |
3 files changed, 17 insertions, 16 deletions
diff --git a/meta/lib/oeqa/selftest/archiver.py b/meta/lib/oeqa/selftest/archiver.py index 97b6f5b2123..d214536b5de 100644 --- a/meta/lib/oeqa/selftest/archiver.py +++ b/meta/lib/oeqa/selftest/archiver.py @@ -1,5 +1,5 @@ from oeqa.selftest.base import oeSelfTest -from oeqa.utils.commands import bitbake, get_bb_var +from oeqa.utils.commands import bitbake, get_bb_vars from oeqa.utils.decorators import testcase import glob import os @@ -28,10 +28,11 @@ class Archiver(oeSelfTest): features += 'COPYLEFT_PN_EXCLUDE = "%s"\n' % exclude_recipe self.write_config(features) - shutil.rmtree(get_bb_var('TMPDIR')) + bb_vars = get_bb_vars(['TMPDIR', 'DEPLOY_DIR_SRC', 'TARGET_SYS']) + shutil.rmtree(bb_vars['TMPDIR']) bitbake("%s %s" % (include_recipe, exclude_recipe)) - src_path = os.path.join(get_bb_var('DEPLOY_DIR_SRC'), get_bb_var('TARGET_SYS')) + src_path = os.path.join(bb_vars['DEPLOY_DIR_SRC'], bb_vars['TARGET_SYS']) # Check that include_recipe was included included_present = len(glob.glob(src_path + '/%s-*' % include_recipe)) diff --git a/meta/lib/oeqa/selftest/buildhistory.py b/meta/lib/oeqa/selftest/buildhistory.py index 674da6205a2..008c39c9560 100644 --- a/meta/lib/oeqa/selftest/buildhistory.py +++ b/meta/lib/oeqa/selftest/buildhistory.py @@ -3,14 +3,15 @@ import re import datetime from oeqa.selftest.base import oeSelfTest -from oeqa.utils.commands import bitbake, get_bb_var +from oeqa.utils.commands import bitbake, get_bb_vars from oeqa.utils.decorators import testcase class BuildhistoryBase(oeSelfTest): def config_buildhistory(self, tmp_bh_location=False): - if (not 'buildhistory' in get_bb_var('USER_CLASSES')) and (not 'buildhistory' in get_bb_var('INHERIT')): + bb_vars = get_bb_vars(['USER_CLASSES', 'INHERIT']) + if (not 'buildhistory' in bb_vars['USER_CLASSES']) and (not 'buildhistory' in bb_vars['INHERIT']): add_buildhistory_config = 'INHERIT += "buildhistory"\nBUILDHISTORY_COMMIT = "1"' self.append_config(add_buildhistory_config) diff --git a/meta/lib/oeqa/selftest/eSDK.py b/meta/lib/oeqa/selftest/eSDK.py index c95ca6deb2c..87c88e22ecd 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') @@ -64,7 +65,7 @@ class oeSDKExtSelfTest(oeSelfTest): runCmd("%s -y -d \"%s\"" % (cls.ext_sdk_path, cls.tmpdir_eSDKQA)) cls.env_eSDK = oeSDKExtSelfTest.get_esdk_environment('', cls.tmpdir_eSDKQA) - + sstate_config=""" SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS" SSTATE_MIRRORS = "file://.* http://%s/PATH" @@ -73,7 +74,6 @@ CORE_IMAGE_EXTRA_INSTALL = "perl" with open(os.path.join(cls.tmpdir_eSDKQA, 'conf', 'local.conf'), 'a+') as f: f.write(sstate_config) - @classmethod def setUpClass(cls): @@ -83,7 +83,7 @@ CORE_IMAGE_EXTRA_INSTALL = "perl" cls.http_service.start() cls.http_url = "http://127.0.0.1:%d" % cls.http_service.port - + cls.image = 'core-image-minimal' cls.tmpdir_eSDKQA = tempfile.mkdtemp(prefix='eSDKQA') @@ -103,7 +103,6 @@ SSTATE_MIRRORS = "file://.* http://%s/PATH" with open(os.path.join(cls.tmpdir_eSDKQA, 'conf', 'local.conf'), 'a+') as f: f.write(sstate_config) - @classmethod def tearDownClass(cls): shutil.rmtree(cls.tmpdir_eSDKQA) @@ -115,8 +114,8 @@ 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(1472) + def test_image_generation_binary_feeds(self): image = 'core-image-minimal' cmd = "devtool build-image %s" % image |