All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] selftest: automatically add the meta-selftest layer
@ 2017-01-19 15:55 Benjamin Esquivel
  0 siblings, 0 replies; only message in thread
From: Benjamin Esquivel @ 2017-01-19 15:55 UTC (permalink / raw)
  To: openembedded-core

adding the meta-selftest layer is a small bump you always encounter
when you want to run selftest. Adding an automatic procedure to include
the layer if it is not yet present.

Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com>
---
 scripts/oe-selftest | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/scripts/oe-selftest b/scripts/oe-selftest
index 120a6c2..b81e58c 100755
--- a/scripts/oe-selftest
+++ b/scripts/oe-selftest
@@ -131,8 +131,16 @@ def preflight_check():
         os.chdir(builddir)
 
     if not "meta-selftest" in get_bb_var("BBLAYERS"):
-        log.error("You don't seem to have the meta-selftest layer in BBLAYERS")
-        return False
+        log.warn("meta-selftest layer not found in BBLAYERS, adding it")
+        meta_selftestdir = os.path.join(
+                get_bb_var("BBLAYERS_FETCH_DIR"),
+                'meta-selftest')
+        if os.path.isdir(meta_selftestdir):
+            runCmd("bitbake-layers add-layer %s" %meta_selftestdir)
+        else:
+            log.error("could not locate meta-selftest in:\n%s"
+                    %meta_selftestdir)
+            return False
 
     log.info("Running bitbake -p")
     runCmd("bitbake -p")
-- 
2.5.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-01-19 23:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-19 15:55 [PATCH] selftest: automatically add the meta-selftest layer Benjamin Esquivel

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.