get_all_available_recipes, is_recipe_valid, get_tasks_for_recipe Signed-off-by: Daniel Istrate <daniel.alexandrux.istr...@intel.com> --- meta/lib/oeqa/utils/commands.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index 32e001c..6ae09d2 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py @@ -165,6 +165,26 @@ def get_test_layer(): break return testlayer + +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_tasks_for_recipe(recipe): + """ Get available tasks for recipe """ + ret = bitbake('-c listtasks %s' % recipe) + tasks = re.findall(':\s+do_(\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: -- 2.1.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core