Uploaded image for project: 'SonarCFamily'
  1. SonarCFamily
  2. CPP-3386

Bullseye coverage: Coverage import should not fail when probe kind is constant and no event is present

    XMLWordPrintable

    Details

      Description

      Bullseye coverage format was recently changed to have probes of kind constant to not have an event.

      From https://www.bullseye.com/help/ref-covxml.html:

      The probe Element

      <probe line="n" column="n" col_seq="n" kind="kind" event="event"/>

      Attribute Description
      line Source file line number
      column Beginning column number of the code measured by the probe, not counting whitespace. If not present, the value is zero.
      col_seq Column sequence number. Uniquely identifies probes having the same line and column. If not present, the value is zero.
      kind One of: catchconditionconstantdecisionfor-range-bodyfunctionswitch-labeltry
      event One of: nonefalsetruefull. Value none indicates no coverage. Value false indicates the condition or decision evaluated to false at least once, but never true. Value true indicates the condition or decision evaluated to true at least once, but never false. Value full indicates all possible coverage. For example, a decision covered both true and to false is indicated by full. When the kind attribute has value "constant", there is no event attribute.

      Workaround

      Replace the following in the report:

       kind="constant"/>
      

      with

       kind="constant" event="none"/>
      

      i.e. using sed.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              massimo.paladin Massimo PALADIN
              Reporter:
              massimo.paladin Massimo PALADIN
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: