Codecov is statistics are empty

Description

I’m getting 0% coverage.

Repository

CI/CD

Travis:

Uploader

  • bash <(curl -s https://codecov.io/bash) -t 03230181-dc42-4e8c-b1f6-46699ee5d066 -R /home/travis/build/sys-bio/libOmexMeta

Commit SHAs

da57b1a5a1ae0121638273eec77cc4bce4e4a6f6

Codecov YAML

codecov:
  token:  03230181-dc42-4e8c-b1f6-46699ee5d066 # Your private repository token
  branch: master  # override the default branch
#  bot: CiaranWelsh  # set user whom will be the consumer of oauth requests
#  ci:  # Custom CI domains if Codecov does not identify them automatically
#    - travis.org
#  require_ci_to_pass: yes

coverage:
  precision: 2
  round: down
  range: "70...100"

parsers:
  gcov:
    branch_detection:
      conditional: yes
      loop: yes
      method: no
      macro: no

Codecov Output

3.41s$ bash <(curl -s https://codecov.io/bash) -t 03230181-dc42-4e8c-b1f6-46699ee5d066 -R /home/travis/build/sys-bio/libOmexMeta
  _____          _
 / ____|        | |
| |     ___   __| | ___  ___ _____   __
| |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| |  __/ (_| (_) \ V /
 \_____\___/ \__,_|\___|\___\___/ \_/
                              Bash-20200629-ffaf297
==> Travis CI detected.
    project root: /home/travis/build/sys-bio/libOmexMeta
    Yaml found at: codecov.yml
==> Running gcov in /home/travis/build/sys-bio/libOmexMeta (disable via -X gcov)
==> Searching for coverage reports in:
    + /home/travis/build/sys-bio/libOmexMeta
    -> Found 2 reports
==> Detecting git/mercurial file structure
==> Appending build variables
    + TRAVIS_OS_NAME
==> Reading reports
    + /home/travis/build/sys-bio/libOmexMeta/src/redland/rasqal-0.9.33/tests/laqrs/syntax/coverage.rq bytes=236
    + /home/travis/build/sys-bio/libOmexMeta/build/coverage.xml bytes=395
==> Appending adjustments
    https://docs.codecov.io/docs/fixing-reports
    + Found adjustments
==> Gzipping contents
==> Uploading reports
    url: https://codecov.io
    query: branch=master&commit=baff0e934eaa4f50aa7b342a4daab750765e6a0c&build=292.1&build_url=&name=&tag=&slug=sys-bio%2FlibOmexMeta&service=travis&flags=&pr=false&job=705031638
->  Pinging Codecov
https://codecov.io/upload/v4?package=bash-20200629-ffaf297&token=secret&branch=master&commit=baff0e934eaa4f50aa7b342a4daab750765e6a0c&build=292.1&build_url=&name=&tag=&slug=sys-bio%2FlibOmexMeta&service=travis&flags=&pr=false&job=705031638
->  Uploading to
https://storage.googleapis.com/codecov/v4/raw/2020-07-05/F9D613B47CAB02AD35CC9A68F9C40CEA/baff0e934eaa4f50aa7b342a4daab750765e6a0c/9269b7ac-d5ad-44bb-be38-7e7e9f614641.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EQX6OZVJGHKK3633AAFGLBUCOOATRACRQRQF6HMSMLYUP6EAD6XSWAAY%2F20200705%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20200705T010857Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=b6b5821df9094f46676a24297edaf2fd46e947142f28b755d9273a7b4b8a4bc0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  108k    0     0  100  108k      0   551k --:--:-- --:--:-- --:--:--  551k
    -> View reports at https://codecov.io/github/sys-bio/libOmexMeta/commit/baff0e934eaa4f50aa7b342a4daab750765e6a0c

Additional Information

I’m using gcov for coverage of a c/c++ project. I have used this cmake module. It was important for me to update gcovr with pip install gcovr before the coverage targets worked. The coverage section of my cmake script is only small and starts on line 333 of my main cmake script. Locally, I am able to build the TestCoverageHtml or TestCoverageXml targets and generate the required reports, but this does not work with travis / codecov - (nor coveralls for that matter, so its clearly something I’m doing wrong, but I don’t understand what that is). I’d greatly appreciate it if somebody could lend me a hand.

Thanks

Ciaran

Hi @CiaranWelsh, looks like there might be an issue with the way you are collecting coverage reports. Codecov is receiving the following:

# path=/home/travis/build/sys-bio/libOmexMeta/src/redland/rasqal-0.9.33/tests/laqrs/syntax/coverage.rq
PREFIX ex: <http://example.org/ex#>
EXPLAIN SELECT $number $name ( (3 + $number) AS foo ) ( COUNT(*) AS bar )
FROM <data.rdf>
WHERE {
 $r a ex:Class ;
    ex:numPred $number ;
    ex:stringPred $name .
}
GROUP BY $name ORDER BY $number
# path=/home/travis/build/sys-bio/libOmexMeta/build/coverage.xml
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE coverage SYSTEM 'http://cobertura.sourceforge.net/xml/coverage-04.dtd'>
<coverage line-rate="0.0" branch-rate="0.0" lines-covered="0" lines-valid="0" branches-covered="0" branches-valid="0" complexity="0.0" timestamp="1593911334" version="gcovr 4.2"><sources><source>/home/travis/build/sys-bio/libOmexMeta</source></sources><packages/></coverage><<<<<< EOF

As you can see, there isn’t really information here for us to parse, so that’s why you are seeing no coverage or 0% coverage. I would check the way you are running gcovr and print out the reports you are sending over. You can always add the -q flag to view the report sent to Codecov. Let me know if this helps!