Exemplo n.º 1
0
lib_path = scripts_path + '/lib'
sys.path = sys.path + [lib_path]
import scriptutils
import scriptpath
scriptpath.add_oe_lib_path()
scriptpath.add_bitbake_lib_path()

from compatlayer import LayerType, detect_layers, add_layer, get_signatures
from oeqa.utils.commands import get_bb_vars

PROGNAME = 'yocto-compat-layer'
CASES_PATHS = [
    os.path.join(os.path.abspath(os.path.dirname(__file__)), 'lib',
                 'compatlayer', 'cases')
]
logger = scriptutils.logger_create(PROGNAME, stream=sys.stdout)


def test_layer_compatibility(td, layer):
    from compatlayer.context import CompatLayerTestContext
    logger.info("Starting to analyze: %s" % layer['name'])
    logger.info(
        "----------------------------------------------------------------------"
    )

    tc = CompatLayerTestContext(td=td, logger=logger, layer=layer)
    tc.loadTests(CASES_PATHS)
    return tc.runTests()


def main():
Exemplo n.º 2
0
import os
import os.path
import subprocess
import re
import argparse
import logging
import tempfile
import shutil
import signal
import fnmatch

scripts_lib_path = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'lib'))
sys.path.insert(0, scripts_lib_path)
import scriptutils
import argparse_oe
logger = scriptutils.logger_create('devtool-stress')

def select_recipes(args):
    import bb.tinfoil
    tinfoil = bb.tinfoil.Tinfoil()
    tinfoil.prepare(False)

    pkg_pn = tinfoil.cooker.recipecache.pkg_pn
    (latest_versions, preferred_versions) = bb.providers.findProviders(tinfoil.config_data, tinfoil.cooker.recipecache, pkg_pn)

    skip_classes = args.skip_classes.split(',')

    recipelist = []
    for pn in sorted(pkg_pn):
        pref = preferred_versions[pn]
        inherits = [os.path.splitext(os.path.basename(f))[0] for f in tinfoil.cooker.recipecache.inherits[pref[1]]]
Exemplo n.º 3
0
import urllib.request


# Allow importing scripts/lib modules
scripts_path = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/..')
lib_path = scripts_path + '/lib'
sys.path = sys.path + [lib_path]
import scriptpath
import scriptutils

# Allow importing bitbake modules
bitbakepath = scriptpath.add_bitbake_lib_path()

import bb.tinfoil

logger = scriptutils.logger_create('verify_homepage')

def wgetHomepage(pn, homepage):
    result = subprocess.call('wget ' + '-q -T 5 -t 1 --spider ' + homepage, shell = True)
    if result:
        logger.warning("%s: failed to verify HOMEPAGE: %s " % (pn, homepage))
        return 1
    else:
        return 0

def verifyHomepage(bbhandler):
    pkg_pn = bbhandler.cooker.recipecaches[''].pkg_pn
    pnlist = sorted(pkg_pn)
    count = 0
    checked = []
    for pn in pnlist:
Exemplo n.º 4
0
import os
import os.path
import subprocess
import re
import argparse
import logging
import tempfile
import shutil
import signal
import fnmatch

scripts_lib_path = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'lib'))
sys.path.insert(0, scripts_lib_path)
import scriptutils
import argparse_oe
logger = scriptutils.logger_create('devtool-stress')

def select_recipes(args):
    import bb.tinfoil
    tinfoil = bb.tinfoil.Tinfoil()
    tinfoil.prepare(False)

    pkg_pn = tinfoil.cooker.recipecache.pkg_pn
    (latest_versions, preferred_versions) = bb.providers.findProviders(tinfoil.config_data, tinfoil.cooker.recipecache, pkg_pn)

    skip_classes = args.skip_classes.split(',')

    recipelist = []
    for pn in sorted(pkg_pn):
        pref = preferred_versions[pn]
        inherits = [os.path.splitext(os.path.basename(f))[0] for f in tinfoil.cooker.recipecache.inherits[pref[1]]]
Exemplo n.º 5
0
import os.path
import subprocess
import re
import argparse
import logging
import tempfile
import shutil
import signal
import fnmatch

scripts_lib_path = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "lib"))
sys.path.insert(0, scripts_lib_path)
import scriptutils
import argparse_oe

logger = scriptutils.logger_create("devtool-stress")


def select_recipes(args):
    import bb.tinfoil

    tinfoil = bb.tinfoil.Tinfoil()
    tinfoil.prepare(False)

    pkg_pn = tinfoil.cooker.recipecache.pkg_pn
    (latest_versions, preferred_versions) = bb.providers.findProviders(
        tinfoil.config_data, tinfoil.cooker.recipecache, pkg_pn
    )

    skip_classes = args.skip_classes.split(",")
Exemplo n.º 6
0
import urllib.request

# Allow importing scripts/lib modules
scripts_path = os.path.abspath(
    os.path.dirname(os.path.realpath(__file__)) + '/..')
lib_path = scripts_path + '/lib'
sys.path = sys.path + [lib_path]
import scriptpath
import scriptutils

# Allow importing bitbake modules
bitbakepath = scriptpath.add_bitbake_lib_path()

import bb.tinfoil

logger = scriptutils.logger_create('verify_homepage')


def wgetHomepage(pn, homepage):
    result = subprocess.call('wget ' + '-q -T 5 -t 1 --spider ' + homepage,
                             shell=True)
    if result:
        logger.warning("%s: failed to verify HOMEPAGE: %s " % (pn, homepage))
        return 1
    else:
        return 0


def verifyHomepage(bbhandler):
    pkg_pn = bbhandler.cooker.recipecaches[''].pkg_pn
    pnlist = sorted(pkg_pn)
import scriptpath

scriptpath.add_oe_lib_path()
scriptpath.add_bitbake_lib_path()

from compatlayer import LayerType, detect_layers, add_layer, get_signatures
from oeqa.utils.commands import get_bb_vars

PROGNAME = 'yocto-compat-layer'
DEFAULT_OUTPUT_LOG = '%s-%s.log' % (PROGNAME, time.strftime("%Y%m%d%H%M%S"))
OUTPUT_LOG_LINK = "%s.log" % PROGNAME
CASES_PATHS = [
    os.path.join(os.path.abspath(os.path.dirname(__file__)), 'lib',
                 'compatlayer', 'cases')
]
logger = scriptutils.logger_create(PROGNAME)


def test_layer_compatibility(td, layer):
    from compatlayer.context import CompatLayerTestContext
    logger.info("Starting to analyze: %s" % layer['name'])
    logger.info(
        "----------------------------------------------------------------------"
    )

    tc = CompatLayerTestContext(td=td, logger=logger, layer=layer)
    tc.loadTests(CASES_PATHS)
    return tc.runTests()


def main():
Exemplo n.º 8
0
scripts_path = os.path.dirname(os.path.realpath(__file__))
lib_path = scripts_path + '/lib'
sys.path = sys.path + [lib_path]
import scriptutils
import scriptpath
scriptpath.add_oe_lib_path()
scriptpath.add_bitbake_lib_path()

from compatlayer import LayerType, detect_layers, add_layer, add_layer_dependencies, get_signatures
from oeqa.utils.commands import get_bb_vars

PROGNAME = 'yocto-compat-layer'
CASES_PATHS = [os.path.join(os.path.abspath(os.path.dirname(__file__)),
                'lib', 'compatlayer', 'cases')]
logger = scriptutils.logger_create(PROGNAME, stream=sys.stdout)

def test_layer_compatibility(td, layer):
    from compatlayer.context import CompatLayerTestContext
    logger.info("Starting to analyze: %s" % layer['name'])
    logger.info("----------------------------------------------------------------------")

    tc = CompatLayerTestContext(td=td, logger=logger, layer=layer)
    tc.loadTests(CASES_PATHS)
    return tc.runTests()

def main():
    parser = argparse.ArgumentParser(
            description="Yocto Project compatibility layer tool",
            add_help=False)
    parser.add_argument('layers', metavar='LAYER_DIR', nargs='+',