From: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 4/9] oeqa/utils/commands: Added 3 new methods for recipes
Date: Fri, 26 Feb 2016 16:40:46 +0200 [thread overview]
Message-ID: <1456497651-23161-4-git-send-email-daniel.alexandrux.istrate@intel.com> (raw)
In-Reply-To: <1456497651-23161-1-git-send-email-daniel.alexandrux.istrate@intel.com>
get_all_available_recipes, is_recipe_valid, get_tasks_for_recipe
Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@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
next prev parent reply other threads:[~2016-02-26 14:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 14:40 [PATCH 1/9] selftest: Moved method from oe-selftest to oeqa/runner.py Daniel Istrate
2016-02-26 14:40 ` [PATCH 2/9] selftest: Moved coverage functionality " Daniel Istrate
2016-02-26 14:40 ` [PATCH 3/9] selftest: Moved list_classes, list_modules, run methods to runner.py Daniel Istrate
2016-02-26 14:40 ` Daniel Istrate [this message]
2016-02-26 14:40 ` [PATCH 5/9] scripts: test-recipe Tool for running tests on recipes Daniel Istrate
2016-02-26 14:40 ` [PATCH 6/9] recipetests: base - Base Class for Test Recipes Daniel Istrate
2016-02-26 14:40 ` [PATCH 7/9] recipetests: buildrecipe: Test suite for recipe tests Daniel Istrate
2016-02-26 14:40 ` [PATCH 8/9] oeqa/utils/commands: Added method - get_all_bbappends Daniel Istrate
2016-02-26 14:40 ` [PATCH 9/9] recipetests: buildrecipe: Test combinations of bbappend Daniel Istrate
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1456497651-23161-4-git-send-email-daniel.alexandrux.istrate@intel.com \
--to=daniel.alexandrux.istrate@intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.