Did I find the right examples for you? yes no

All Samples(44)  |  Call(35)  |  Derive(0)  |  Import(9)

src/o/e/oe-core-HEAD/meta/lib/oeqa/selftest/buildoptions.py   oe-core(Download)
from oeqa.selftest.base import oeSelfTest
from oeqa.selftest.buildhistory import BuildhistoryBase
from oeqa.utils.commands import runCmd, bitbake, get_bb_var
import oeqa.utils.ftools as ftools
 
        self.append_config('IMAGE_FEATURES += "ssh-server-openssh"')
        bitbake("core-image-minimal")
        res = runCmd("grep 'Installing openssh-sshd' %s" % (os.path.join(get_bb_var("WORKDIR", "core-image-minimal"), "temp/log.do_rootfs")), ignore_status=True)
        self.remove_config('IMAGE_FEATURES += "ssh-server-openssh"')
        self.assertEqual(0, res.status, msg="No match for openssh-sshd in log.do_rootfs")
        bitbake("core-image-minimal")
        res = runCmd("grep 'Removing openssh-sshd' %s" %(os.path.join(get_bb_var("WORKDIR", "core-image-minimal"), "temp/log.do_rootfs")),ignore_status=True)
    def test_rm_old_image(self):
        bitbake("core-image-minimal")
        deploydir = get_bb_var("DEPLOY_DIR_IMAGE", target="core-image-minimal")
        imagename = get_bb_var("IMAGE_LINK_NAME", target="core-image-minimal")
        deploydir_files = os.listdir(deploydir)

src/o/e/oe-core-HEAD/meta/lib/oeqa/selftest/bbtests.py   oe-core(Download)
import oeqa.utils.ftools as ftools
from oeqa.selftest.base import oeSelfTest
from oeqa.utils.commands import runCmd, bitbake, get_bb_var
 
class BitbakeTests(oeSelfTest):
    def test_image_manifest(self):
        bitbake('core-image-minimal')
        deploydir = get_bb_var("DEPLOY_DIR_IMAGE", target="core-image-minimal")
        imagename = get_bb_var("IMAGE_LINK_NAME", target="core-image-minimal")
        manifest = os.path.join(deploydir, imagename + ".manifest")

src/o/e/oe-core-HEAD/meta/lib/oeqa/selftest/oescripts.py   oe-core(Download)
from oeqa.selftest.base import oeSelfTest
from oeqa.selftest.buildhistory import BuildhistoryBase
from oeqa.utils.commands import Command, runCmd, bitbake, get_bb_var, get_test_layer
 
class TestScripts(oeSelfTest):
 
    def test_cleanup_workdir(self):
        path = os.path.dirname(get_bb_var('WORKDIR', 'gzip'))
        old_version_recipe = os.path.join(get_bb_var('COREBASE'), 'meta/recipes-extended/gzip/gzip_1.3.12.bb')
        bitbake("-ccleansstate gzip")
        bitbake("-ccleansstate -b %s" % old_version_recipe)
        if os.path.exists(get_bb_var('WORKDIR', "-b %s" % old_version_recipe)):
            shutil.rmtree(get_bb_var('WORKDIR', "-b %s" % old_version_recipe))
        if os.path.exists(get_bb_var('WORKDIR', 'gzip')):

src/o/e/oe-core-HEAD/meta/lib/oeqa/selftest/sstatetests.py   oe-core(Download)
import oeqa.utils.ftools as ftools
from oeqa.selftest.base import oeSelfTest
from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer
from oeqa.selftest.sstate import SStateBase
 
    def test_sstate_creation_distro_specific_pass(self):
        targetarch = get_bb_var('TUNE_ARCH')
        self.run_test_sstate_creation(['binutils-cross-'+ targetarch, 'binutils-native'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True)
 
    def test_sstate_creation_distro_specific_fail(self):
        targetarch = get_bb_var('TUNE_ARCH')
    def test_cleansstate_task_distro_specific_nonspecific(self):
        targetarch = get_bb_var('TUNE_ARCH')
        self.run_test_cleansstate_task(['binutils-cross-' + targetarch, 'binutils-native', 'eglibc-initial'], distro_specific=True, distro_nonspecific=True, temp_sstate_location=True)
 
    def test_cleansstate_task_distro_nonspecific(self):
        self.run_test_cleansstate_task(['eglibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
 
    def test_cleansstate_task_distro_specific(self):
        targetarch = get_bb_var('TUNE_ARCH')

src/o/e/oe-core-HEAD/meta/lib/oeqa/selftest/sstate.py   oe-core(Download)
import oeqa.utils.ftools as ftools
from oeqa.selftest.base import oeSelfTest
from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer
 
 
class SStateBase(oeSelfTest):
 
    def setUpLocal(self):
        self.temp_sstate_location = None
        self.sstate_path = get_bb_var('SSTATE_DIR')
    def setUpLocal(self):
        self.temp_sstate_location = None
        self.sstate_path = get_bb_var('SSTATE_DIR')
        self.distro = get_bb_var('NATIVELSBSTRING')
        self.distro_specific_sstate = os.path.join(self.sstate_path, self.distro)
            self.append_config(config_temp_sstate)
            self.track_for_cleanup(temp_sstate_path)
        self.sstate_path = get_bb_var('SSTATE_DIR')
        self.distro = get_bb_var('NATIVELSBSTRING')
        self.distro_specific_sstate = os.path.join(self.sstate_path, self.distro)

src/o/e/oe-core-HEAD/meta/lib/oeqa/selftest/buildhistory.py   oe-core(Download)
import oeqa.utils.ftools as ftools
from oeqa.selftest.base import oeSelfTest
from oeqa.utils.commands import Command, runCmd, bitbake, get_bb_var, get_test_layer
 
 
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')):

src/o/e/oe-core-HEAD/meta/lib/oeqa/selftest/_sstatetests_noauto.py   oe-core(Download)
import oeqa.utils.ftools as ftools
from oeqa.selftest.base import oeSelfTest
from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer
from oeqa.selftest.sstate import SStateBase
 
 
        self.configure_builddir(buildA)
        runCmd((". %s/oe-init-build-env %s && " % (get_bb_var('COREBASE'), buildA)) + 'bitbake  ' + ' '.join(map(str, primary_targets)), shell=True, executable='/bin/bash')
        self.hardlink_tree(os.path.join(buildA, 'sstate-cache'), os.path.join(self.builddir, 'sstate-cache-buildA'))
        shutil.rmtree(buildA)
            self.hardlink_tree(os.path.join(self.builddir, 'sstate-cache-buildA'), os.path.join(buildB, 'sstate-cache'))
 
            result_cleansstate = runCmd((". %s/oe-init-build-env %s && " % (get_bb_var('COREBASE'), buildB)) + 'bitbake -ccleansstate ' + target, ignore_status=True, shell=True, executable='/bin/bash')
            if not result_cleansstate.status == 0:
                failed_cleansstate.append(target)
                shutil.rmtree(buildB)
                continue
 
            result_build = runCmd((". %s/oe-init-build-env %s && " % (get_bb_var('COREBASE'), buildB)) + 'bitbake ' + target, ignore_status=True, shell=True, executable='/bin/bash')

src/o/e/oe-core-HEAD/meta/lib/oeqa/selftest/prservice.py   oe-core(Download)
import oeqa.utils.ftools as ftools
from oeqa.selftest.base import oeSelfTest
from oeqa.utils.commands import runCmd, bitbake, get_bb_var
 
class BitbakePrTests(oeSelfTest):
 
    def get_pr_version(self, package_name):
        pkgdata_dir = get_bb_var('PKGDATA_DIR')
 
        if replace_current_db:
            current_db_path = os.path.join(get_bb_var('PERSISTENT_DIR'), 'prserv.sqlite3')
            self.assertTrue(os.path.exists(current_db_path), msg="Path to current PR Service database is invalid: %s" % current_db_path)
            os.remove(current_db_path)

src/o/e/oe-core-HEAD/meta/lib/oeqa/selftest/base.py   oe-core(Download)
 
import oeqa.utils.ftools as ftools
from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer
 
class oeSelfTest(unittest.TestCase):