Did I find the right examples for you? yes no

All Samples(72)  |  Call(63)  |  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
 
class ImageOptionsTests(oeSelfTest):
 
    def test_incremental_image_generation(self):
        bitbake("-c cleanall core-image-minimal")
    def test_incremental_image_generation(self):
        bitbake("-c cleanall core-image-minimal")
        self.write_config('INC_RPM_IMAGE_GEN = "1"')
        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")
    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_run_bitbake_from_dir_1(self):
        os.chdir(os.path.join(self.builddir, 'conf'))
        bitbake('-e')
    def test_run_bitbake_from_dir_2(self):
        my_env = os.environ.copy()
        my_env['BBPATH'] = my_env['BUILDDIR']
        os.chdir(os.path.dirname(os.environ['BUILDDIR']))
        bitbake('-e', env=my_env)
 
    def test_event_handler(self):
        self.write_config("INHERIT += \"test_events\"")
        result = bitbake('m4-native')
    def test_local_sstate(self):
        bitbake('m4-native -ccleansstate')
        bitbake('m4-native')
        bitbake('m4-native -cclean')
        result = bitbake('m4-native')

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 run_test_sstate_creation(self, targets, distro_specific=True, distro_nonspecific=True, temp_sstate_location=True, should_pass=True):
        self.config_sstate(temp_sstate_location)
 
        if  self.temp_sstate_location:
            bitbake(['-cclean'] + targets)
        else:
            bitbake(['-ccleansstate'] + targets)
 
        bitbake(targets)
    def run_test_cleansstate_task(self, targets, distro_specific=True, distro_nonspecific=True, temp_sstate_location=True):
        self.config_sstate(temp_sstate_location)
 
        bitbake(['-ccleansstate'] + targets)
 

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
 
 
        self.append_config(global_config)
        self.append_recipeinc(target, target_config)
        bitbake("-cclean %s" % target)
        result = bitbake(target, ignore_status=True)
        self.remove_config(global_config)

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 increment_package_pr(self, package_name):
        inc_data = "do_package_append() {\nbb.build.exec_func('do_test_prserv', d)\n}\ndo_test_prserv() {\necho \"The current date is: %s\"\n}" % datetime.datetime.now()
        self.write_recipeinc(package_name, inc_data)
        bitbake("-ccleansstate %s" % package_name)
        res = bitbake(package_name, ignore_status=True)
        stamp_2 = self.get_task_stamp(package_name, track_task)
 
        bitbake("-ccleansstate %s" % package_name)
        self.assertTrue(pr_2 - pr_1 == 1)
        self.assertTrue(stamp_1 != stamp_2)
        pr_2 = self.get_pr_version(package_name)
 
        bitbake("-ccleansstate %s" % package_name)
        self.assertTrue(pr_2 - pr_1 == 1)
 

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')
        old_version = '1.3.12'
        bitbake("-ccleansstate gzip")
        bitbake("-ccleansstate -b %s" % old_version_recipe)
            initial_contents = []
 
        bitbake('gzip')
        intermediary_contents = os.listdir(path)
        bitbake("-b %s" % old_version_recipe)

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
 
    def get_dep_targets(self, primary_targets):
        found_targets = []
        bitbake("-g " + ' '.join(map(str, primary_targets)))
        with open(os.path.join(self.builddir, 'pn-buildlist'), 'r') as pnfile:
            found_targets = pnfile.read().splitlines()

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
 
 

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):