diff options
Diffstat (limited to 'meta/lib/oeqa/utils/commands.py')
-rw-r--r-- | meta/lib/oeqa/utils/commands.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index 08e2cbb906c..8ddb62d2bb1 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py @@ -153,6 +153,18 @@ def get_bb_var(var, target=None, postconfig=None): lastline = line return val + +def get_all_available_recipes(): + ret = bitbake('-s') + available_recipes = re.findall(r'\n(\S+)\s+:', ret.output) + + return available_recipes + + +def is_recipe_valid(recipe): + return recipe in get_all_available_recipes() + + def get_test_layer(): layers = get_bb_var("BBLAYERS").split() testlayer = None @@ -164,6 +176,15 @@ def get_test_layer(): break return testlayer + +def get_tasks_for_recipe(recipe): + """ Get available tasks for recipe """ + ret = bitbake('-c listtasks %s' % recipe) + tasks = re.findall('\ndo_(\S+)\s', ret.output) + + return tasks + + def create_temp_layer(templayerdir, templayername, priority=999, recipepathspec='recipes-*/*'): os.makedirs(os.path.join(templayerdir, 'conf')) with open(os.path.join(templayerdir, 'conf', 'layer.conf'), 'w') as f: |