[gnome-continuous-yocto/gnomeostree-3.28-rocko: 6174/8267] scripts/yocto-compat-layer.py: Return non-zero when layer test fail



commit dd3473c7e679bb4bab7bf82f1b9fae910039a343
Author: Aníbal Limón <anibal limon linux intel com>
Date:   Mon Jun 5 17:06:41 2017 -0500

    scripts/yocto-compat-layer.py: Return non-zero when layer test fail
    
    If whatever layer tested fails returns 2 to indicate the
    failure.
    
    [YOCTO #11482]
    
    (From OE-Core rev: c00102e7b67e5f21247094d41943d767ad13db88)
    
    Signed-off-by: Aníbal Limón <anibal limon linux intel com>
    Signed-off-by: Ross Burton <ross burton intel com>
    Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>

 scripts/yocto-compat-layer.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/scripts/yocto-compat-layer.py b/scripts/yocto-compat-layer.py
index 0d5700b..30c55a9 100755
--- a/scripts/yocto-compat-layer.py
+++ b/scripts/yocto-compat-layer.py
@@ -178,16 +178,19 @@ def main():
         results_status[layer['name']] = 'PASS' if results[layer['name']].wasSuccessful() else 'FAIL'
         layers_tested = layers_tested + 1
 
+    ret = 0
     if layers_tested:
         logger.info('')
         logger.info('Summary of results:')
         logger.info('')
         for layer_name in results_status:
             logger.info('%s ... %s' % (layer_name, results_status[layer_name]))
+            if not results[layer_name].wasSuccessful():
+                ret = 2 # ret = 1 used for initialization errors
 
     cleanup_bblayers(None, None)
 
-    return 0
+    return ret
 
 if __name__ == '__main__':
     try:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]