<?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>8921</bug_id>
          
          <creation_ts>2016-01-13 22:54:53 +0000</creation_ts>
          <short_desc>Code coverage: add ability to create missing &apos;coverage area&apos; reports</short_desc>
          <delta_ts>2020-01-09 16:45:21 +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>5.99</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>OBSOLETE</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>QA REVIEW</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>Future</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Benjamin Esquivel">benjamin.esquivel</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>joshuagloe</cc>
    
    <cc>leonardo.sandoval.gonzalez</cc>
    
    <cc>mhalstead</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>57800</commentid>
    <comment_count>0</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-01-13 22:54:53 +0000</bug_when>
    <thetext>Let&apos;s start by saying that a testing coverage area is a defined code section that can be executed by a test. In the source code, a coverage area can be measured by function then by branch(if/else/case/etc). A given function can present 3 testing coverage statuses:

 - The function is completely un-exercised (zero coverage)
 - The function is partially exercised (Some branches covered, some coverage)
 - Completely executed (all branches covered, 100% coverage)

The objective of this bug is to obtain this information in an automated fashion along with the code coverage report to be able to identify which functions have zero coverage which in turn means that it should be analyzed why tests are missing to exercise that part of the code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59230</commentid>
    <comment_count>1</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2016-02-18 21:26:08 +0000</bug_when>
    <thetext>Currently, python coverage module is being used to measure code execution. The code granularity AFAIK is a module (a complete file) and not a function. With this in mind, we should do some post-processing on annotated code (coverage&apos;s annotated code) to get the functions and then the counting of executed, excluded and missing lines.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68869</commentid>
    <comment_count>2</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2016-12-06 17:29:40 +0000</bug_when>
    <thetext>This is low priority for 2.3 and there is no window time to work on this area during current release.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68894</commentid>
    <comment_count>3</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-12-07 10:58:09 +0000</bug_when>
    <thetext>As this issue got assigned to me I&apos;d like to know why do we need this and is this functionality can be implemented using python-coverage?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68898</commentid>
    <comment_count>4</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2016-12-07 14:37:02 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; As this issue got assigned to me I&apos;d like to know why do we need this and is
&gt; this functionality can be implemented using python-coverage?

I moved to 2.4 and for some reason it got assigned to you.

For your question, oe-selftest is already using python-coverage (version 4.x), so we can produce data. The main task here is the analysis of this data. No plans to do the later during 2.3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85911</commentid>
    <comment_count>5</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2019-12-22 19:32:09 +0000</bug_when>
    <thetext>I believe we are doing this via the resulttool.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86013</commentid>
    <comment_count>6</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2020-01-09 16:45:21 +0000</bug_when>
    <thetext>I don&apos;t believe we ever figured out correct tools for code coverage or that they are practical with the system. If anyone ever does want to do this that is fine however we have other areas QA work would likely be focused on, marking as obsolete, can be reopened if anyone is willing to progress this.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>