diff mbox series

scripts/yocto-check-layer: Don't abort when layer fails to get signatures

Message ID 20181002214323.14564-1-anibal.limon@linaro.org
State Accepted
Commit c8ab558b4fdc77ab54fbb130078c78d43740b4b8
Headers show
Series scripts/yocto-check-layer: Don't abort when layer fails to get signatures | expand

Commit Message

Anibal Limon Oct. 2, 2018, 9:43 p.m. UTC
When execute in multiple layers like meta-openembedded the execution is
aborted when some sublayer fails to get world signatures, so mark it as
an error and continue the execution in the remaining sublayers.

Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
---
 scripts/yocto-check-layer | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comments

Anibal Limon Oct. 2, 2018, 11:43 p.m. UTC | #1
Targeting sumo too.

Anibal

On Tue, 2 Oct 2018 at 16:43, Aníbal Limón <anibal.limon@linaro.org> wrote:

> When execute in multiple layers like meta-openembedded the execution is

> aborted when some sublayer fails to get world signatures, so mark it as

> an error and continue the execution in the remaining sublayers.

>

> Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>

> ---

>  scripts/yocto-check-layer | 9 ++++++++-

>  1 file changed, 8 insertions(+), 1 deletion(-)

>

> diff --git a/scripts/yocto-check-layer b/scripts/yocto-check-layer

> index 5a4fd752ca..9b7e53679b 100755

> --- a/scripts/yocto-check-layer

> +++ b/scripts/yocto-check-layer

> @@ -169,7 +169,14 @@ def main():

>          td['bbvars'] = get_bb_vars()

>          logger.info('Getting initial signatures ...')

>          td['builddir'] = builddir

> -        td['sigs'], td['tunetasks'] = get_signatures(td['builddir'])

> +        try:

> +            td['sigs'], td['tunetasks'] = get_signatures(td['builddir'])

> +        except RuntimeError as e:

> +            logger.info(str(e))

> +            results[layer['name']] = None

> +            results_status[layer['name']] = 'FAIL (Generating world

> signatures)'

> +            layers_tested = layers_tested + 1

> +            continue

>          td['machines'] = args.machines

>

>          if not add_layer(bblayersconf, layer, dep_layers, logger):

> --

> 2.19.0

>

>
<div dir="ltr">Targeting sumo too.<div><br></div><div>Anibal</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, 2 Oct 2018 at 16:43, Aníbal Limón &lt;<a href="mailto:anibal.limon@linaro.org">anibal.limon@linaro.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">When execute in multiple layers like meta-openembedded the execution is<br>
aborted when some sublayer fails to get world signatures, so mark it as<br>
an error and continue the execution in the remaining sublayers.<br>
<br>
Signed-off-by: Aníbal Limón &lt;<a href="mailto:anibal.limon@linaro.org" target="_blank">anibal.limon@linaro.org</a>&gt;<br>

---<br>
 scripts/yocto-check-layer | 9 ++++++++-<br>
 1 file changed, 8 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/scripts/yocto-check-layer b/scripts/yocto-check-layer<br>
index 5a4fd752ca..9b7e53679b 100755<br>
--- a/scripts/yocto-check-layer<br>
+++ b/scripts/yocto-check-layer<br>
@@ -169,7 +169,14 @@ def main():<br>
         td[&#39;bbvars&#39;] = get_bb_vars()<br>
         <a href="http://logger.info" rel="noreferrer" target="_blank">logger.info</a>(&#39;Getting initial signatures ...&#39;)<br>
         td[&#39;builddir&#39;] = builddir<br>
-        td[&#39;sigs&#39;], td[&#39;tunetasks&#39;] = get_signatures(td[&#39;builddir&#39;])<br>
+        try:<br>
+            td[&#39;sigs&#39;], td[&#39;tunetasks&#39;] = get_signatures(td[&#39;builddir&#39;])<br>
+        except RuntimeError as e:<br>
+            <a href="http://logger.info" rel="noreferrer" target="_blank">logger.info</a>(str(e))<br>
+            results[layer[&#39;name&#39;]] = None<br>
+            results_status[layer[&#39;name&#39;]] = &#39;FAIL (Generating world signatures)&#39;<br>
+            layers_tested = layers_tested + 1<br>
+            continue<br>
         td[&#39;machines&#39;] = args.machines<br>
<br>
         if not add_layer(bblayersconf, layer, dep_layers, logger):<br>
-- <br>
2.19.0<br>
<br>
</blockquote></div>
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/scripts/yocto-check-layer b/scripts/yocto-check-layer
index 5a4fd752ca..9b7e53679b 100755
--- a/scripts/yocto-check-layer
+++ b/scripts/yocto-check-layer
@@ -169,7 +169,14 @@  def main():
         td['bbvars'] = get_bb_vars()
         logger.info('Getting initial signatures ...')
         td['builddir'] = builddir
-        td['sigs'], td['tunetasks'] = get_signatures(td['builddir'])
+        try:
+            td['sigs'], td['tunetasks'] = get_signatures(td['builddir'])
+        except RuntimeError as e:
+            logger.info(str(e))
+            results[layer['name']] = None
+            results_status[layer['name']] = 'FAIL (Generating world signatures)'
+            layers_tested = layers_tested + 1
+            continue
         td['machines'] = args.machines
 
         if not add_layer(bblayersconf, layer, dep_layers, logger):