How to use codecov when having multiple git repositories?

I am trying to use codecov for AXCIOMA which is a C++11 based project that consists out of multiple git repositories. Code from multiple repositories is tested using a test suite, what is the best way to do this all with codecode. I want to see coverage in the various repositories, I can’t find any docu how to configure this.

The following repositories are used:

To try it out, the following steps give you some results

git clone https://github.com/RemedyIT/axcioma
cd axcioma/
bin/brix11 bootstrap
bin/brix11 -E configure

Now open ACE/ACE/include/makeinclude/platform_macros.GNU and add gcov=1 as first line in this file and save it

bin/brix11 gen build workspace.mwc
bin/brix11 make
bin/brix11 gen build taox11/tests
bin/brix11 make -N taox11/tests
bin/brix11 run list -l taox11/bin/taox11_tests.lst -r taox11/
bash <(curl -s https://codecov.io/bash)

All environment values which are set during the build can be easily printed using

bin/brix11 env

1 Like

Hello, can you please share the Codecov upload command you are using?

I’ve fixed your links access, btw :slight_smile:

Updated the command and added the two other repositories, tried to upload to https://codecov.io/gh/RemedyIT

Can you share the commit SHA, or the output from the command so I can locate it in our logs and see what’s happening?

Looks uploading fails each time

==> Appending adjustments
    http://docs.codecov.io/docs/fixing-reports
    + Found adjustments
==> Gzipping contents
==> Uploading reports
    url: https://codecov.io
    query: branch=master&commit=1de2707f41812628d43dfd42f4cf8fd433cdc0d2&build=&build_url=&name=&tag=&slug=RemedyIT%2Faxcioma&service=&flags=&pr=&job=
    -> Pinging Codecov
https://codecov.io/upload/v4?package=bash-20191211-b8db533&token=secret&branch=master&commit=1de2707f41812628d43dfd42f4cf8fd433cdc0d2&build=&build_url=&name=&tag=&slug=RemedyIT%2Faxcioma&service=&flags=&pr=&job=
    -> Uploading
    X> Failed to upload
    -> Sleeping for 30s and trying again...
    -> Pinging Codecov
https://codecov.io/upload/v4?package=bash-20191211-b8db533&token=secret&branch=master&commit=1de2707f41812628d43dfd42f4cf8fd433cdc0d2&build=&build_url=&name=&tag=&slug=RemedyIT%2Faxcioma&service=&flags=&pr=&job=
    -> Uploading
    -> View reports at https://codecov.io/github/RemedyIT/axcioma/commit/1de2707f41812628d43dfd42f4cf8fd433cdc0d2

Codecov was started using the following command, token was also set as environment
bash <(curl -s https://codecov.io/bash -t token)

It looks like you may be hitting an issue we recent discovered with the handling of gcov reports.

Can I ask you to try the -X fixes flag on the bash uploader and see if this helps?

Didn’t help, the new command

bash <(curl -s https://codecov.io/bash) -t token -X fixes

And the output below, I am running on OpenSuSE Tumbleweed, not sure whether that has an impact

==> Gzipping contents
==> Uploading reports
    url: https://codecov.io
    query: branch=master&commit=1de2707f41812628d43dfd42f4cf8fd433cdc0d2&build=&build_url=&name=&tag=&slug=RemedyIT%2Faxcioma&service=&flags=&pr=&job=
    -> Pinging Codecov
https://codecov.io/upload/v4?package=bash-20191211-b8db533&token=secret&branch=master&commit=1de2707f41812628d43dfd42f4cf8fd433cdc0d2&build=&build_url=&name=&tag=&slug=RemedyIT%2Faxcioma&service=&flags=&pr=&job=
    -> Uploading
    X> Failed to upload
    -> Sleeping for 30s and trying again...
    -> Pinging Codecov
https://codecov.io/upload/v4?package=bash-20191211-b8db533&token=secret&branch=master&commit=1de2707f41812628d43dfd42f4cf8fd433cdc0d2&build=&build_url=&name=&tag=&slug=RemedyIT%2Faxcioma&service=&flags=&pr=&job=
    -> Uploading
    -> View reports at https://codecov.io/github/RemedyIT/axcioma/commit/1de2707f41812628d43dfd42f4cf8fd433cdc0d2

OS shouldn’t matter.

Here’ the raw report you uploaded: codecov.io/codecov/v4/raw/2020-02-06/8BB0EBA3998FD27CBE729EB7649A1D58/1de2707f41812628d43dfd42f4cf8fd433cdc0d2/551f0240-7944-465e-a601-9e4887cf8eb3.txt

The issue here is we can’t match the paths in the report file to files in your repo (the network section)

You will need to set up a fixes section: https://docs.codecov.io/docs/fixing-paths

The docs are a little unclear, but the first part is what you want to remove from the report path, and then in this case would would leave the second part empty.

Thanks, I will give it a try. How would this work when we have multiple repositories? Run your bash script multiple times, each time a different directory as root?

You would also use flags, which you can limit to certain paths.

Ok, so upload multiple times, each time limiting the scope to the repository we upload to?

Looks we need to test this a little bit and see how this all works. Some more insight of what happens and why things fail would be welcome, now the bash script just finishes and no idea why it fails.

Just uploaded only the taox11 part (see https://github.com/RemedyIT/taox11) to RemedyIT/taox11, upload seems to work now, but no results

=> Gzipping contents
==> Uploading reports
    url: https://codecov.io
    query: branch=master&commit=09a8888c40fedcb899d9b10e351ebb30542c598a&build=&build_url=&name=&tag=&slug=RemedyIT%2Ftaox11&service=&flags=&pr=&job=
    -> Pinging Codecov
https://codecov.io/upload/v4?package=bash-20191211-b8db533&token=secret&branch=master&commit=09a8888c40fedcb899d9b10e351ebb30542c598a&build=&build_url=&name=&tag=&slug=RemedyIT%2Ftaox11&service=&flags=&pr=&job=
    -> Uploading
    -> View reports at https://codecov.io/github/RemedyIT/taox11/commit/09a8888c40fedcb899d9b10e351ebb30542c598a

Not sure what format bin/taox11_tests.lst is, but we can’t process it.

Here’s a list of what we can process: https://docs.codecov.io/docs/supported-report-formats

I think bin/taox11_tests.lst came from a run in a wrong directory (no gcov at all), just did another test with a coverage.yml, looks for commit 09a8888 it now says processing, now waiting on some results.

==> Gzipping contents
==> Uploading reports
    url: https://codecov.io
    query: branch=master&commit=09a8888c40fedcb899d9b10e351ebb30542c598a&build=&build_url=&name=&tag=&slug=RemedyIT%2Ftaox11&service=&flags=&pr=&job=
    -> Pinging Codecov
https://codecov.io/upload/v4?package=bash-20191211-b8db533&token=secret&branch=master&commit=09a8888c40fedcb899d9b10e351ebb30542c598a&build=&build_url=&name=&tag=&slug=RemedyIT%2Ftaox11&service=&flags=&pr=&job=
    -> Uploading
    -> View reports at https://codecov.io/github/RemedyIT/taox11/commit/09a8888c40fedcb899d9b10e351ebb30542c598a

That still sent us a bin/taox11_tests.lst file, per the logs.

That is a file used by our test framework which should be ignored. There is no gcov for that file, will try to ignore it, is there a way to see all logs of all uploads we do?

You should be able to add a direct link for it in the ignore section: https://docs.codecov.io/docs/ignoring-paths

We don’t have have a current way on codecov.io to show failed logs. We have an new UI coming soon that I believe will address that lack.

However, you can add the -d flag to the bash uploader and it will output the report to stdout instead of uploading it.

Excluding *.lst file globally did the trick, TAOX11 is now uploaded and visible. Will try to setup the other repositories, do one full compile/test cycle and upload to codecov for each repository independently.

1 Like

I have been able to add two additional repositories, but have a problem uploading the results for DOCGroup/ACE_TAO, see https://codecov.io/gh/DOCGroup/ACE_TAO/commit/27a211b5baf83d178e1b3883ab061deab4447bd6. Can you see why it failed?