<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>11482</bug_id>
          
          <creation_ts>2017-05-08 15:08:22 +0000</creation_ts>
          <short_desc>yocto-compat-layer.py: return non-zero exit codes</short_desc>
          <delta_ts>2017-06-09 16:45:39 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>Scripts and Tools</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.4 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Ohly">patrick.ohly</reporter>
          <assigned_to name="Aníbal Limón">anibal.limon</assigned_to>
          <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>73119</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-05-08 15:08:22 +0000</bug_when>
    <thetext>In the summary after a test, yocto-compat-layer.py explains which tests failed, but then doesn&apos;t actually indicate that to the caller in the return code:

$ oe-selftest ... 
INFO: ----------------------------------------------------------------------
INFO: Ran 4 tests in 2.756s
INFO: 
INFO: FAILED (errors=1, skipped=3)
INFO: 
INFO: Summary of results:
INFO: 
INFO: meta-refkit-gateway ... FAIL
# echo $?
0

That&apos;s because main() in yocto-compat-layer.py always returns 0. It would be better if it returned 1 if any test failed and 2 if none were run.

The a script can test for success (== 0) and distinguish between different kinds of failures (error or no tests) if desired.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73703</commentid>
    <comment_count>1</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2017-06-05 22:07:48 +0000</bug_when>
    <thetext>Review at,


http://lists.openembedded.org/pipermail/openembedded-core/2017-June/137575.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73951</commentid>
    <comment_count>2</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2017-06-09 16:45:39 +0000</bug_when>
    <thetext>Merge at,

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=dd3473c7e679bb4bab7bf82f1b9fae910039a343</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>